Skip to content
Now it's easy to highlight any text in your UILabel.
Latest commit 774cd05 Aug 5, 2013 @dineshrajas Update
Failed to load latest commit information.
HighlightLabel.xcodeproj modified license Aug 4, 2013
HighlightLabel Added whole files to the project Aug 4, 2013
.gitignore added gitignore file Aug 4, 2013
LICENSE modified license Aug 4, 2013 Update Aug 5, 2013
Screenshot1.png Added screenshots Aug 4, 2013
Screenshot2.png Added screenshots Aug 4, 2013


Now it's easy to highlight any text in your UILabel.


  • ARC enabled.
  • Supports from iOS 4.3.
  • Change the highlight color
  • Uses NSAttributedString. So no performance issues.

HighlightLabel Screenshot

HighlightLabel Screenshot


  • CoreText.Framework


Add the Classes folder to your project. Add CoreText framework to your project. HighlightLabel uses ARC. If you have a project that doesn't use ARC, just add the -fobjc-arc compiler flag to the HighlightLabel files.


Basic Setup

In your viewController file:

#import "HighlightLabel.h"

// _label is an outlet for HighlightLabel
_label.text = @"Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.";
_label.highlightText = @"Lorem ipsum dolor sit er elit lamet";
_label.highlightColor = [UIColor yellowColor];


For present, It won't support the textAlignment for UILabel. Hope I will update it soon.


Please forward your queries to me

Fork and contribute to this project if you can. Thank you.

Something went wrong with that request. Please try again.