Latest 1.5.9
License MIT
Platforms ios 5.0, requires ARC
Dependencies RegexKitLite, AFMacros, NSString-HTML

With CoreTextLabel you are able draw NSAttributedString or HTML with custom font and color in iOS (>= 5.0) applications.
numberOfLines and truncation (NSLineBreakByTruncatingTail) is also supported.

Build Status


    CoreTextLabel * label  = [[CoreTextLabel alloc] initWithFrame:frame];
    label.html             = htmlString;
    [label sizeToFit];
    [self.view addSubview:label];


Add CoreTextLabel pod to your Podfile.

$ vim Podfile
platform :ios, '5.0'
pod 'CoreTextLabel', :head

And then you install the dependencies in your project.

$ pod install

Remember to always open the Xcode workspace instead of the project file when you’re building.

$ open App.xcworkspace


CoreTextLabel 1.0 and higher requires iOS 5.0 and above.

Framework dependencies

  • QuartzCore
  • CoreText


CoreTextLabel uses ARC.

If you are using CoreTextLabel in your non-arc project, you will need to set a -fobjc-arc compiler flag on all of the CoreTextLabel source files.

To set a compiler flag in Xcode, go to your active target and select the "Build Phases" tab. Now select all CoreTextLabel source files, press Enter, insert -fobjc-arc or -fno-objc-arc and then "Done" to enable or disable ARC for CoreTextLabel.


CoreTextLabel was created by Daniel Kuhnke for appfarms GmbH & Co. KG


CoreTextLabel is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "CoreTextLabel",
    "version": "1.5.9",
    "summary": "Label to draw NSAttributedString or HTML with custom font and color. textIsTruncated, numberOfLines and lineSpacing is supported.",
    "homepage": "",
    "authors": {
        "Daniel Kuhnke": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.5.9"
    "platforms": {
        "ios": "5.0"
    "requires_arc": true,
    "source_files": "*.{h,m}",
    "license": "MIT",
    "ios": {
        "frameworks": [
    "dependencies": {
        "RegexKitLite": [
        "AFMacros": [],
        "NSString-HTML": []

Pin It on Pinterest

Share This