Latest 1.5.9
Homepage https://github.com/appfarms/CoreTextLabel
License MIT
Platforms ios 5.0, requires ARC
Dependencies RegexKitLite, AFMacros, NSString-HTML
Authors

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

Example

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




Install

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

Requirements

CoreTextLabel 1.0 and higher requires iOS 5.0 and above.

Framework dependencies

  • QuartzCore
  • CoreText

ARC

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.

Credits

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

License

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": "https://github.com/appfarms/CoreTextLabel",
    "authors": {
        "Daniel Kuhnke": "[email protected]"
    },
    "source": {
        "git": "https://github.com/appfarms/CoreTextLabel.git",
        "tag": "1.5.9"
    },
    "platforms": {
        "ios": "5.0"
    },
    "requires_arc": true,
    "source_files": "*.{h,m}",
    "license": "MIT",
    "ios": {
        "frameworks": [
            "QuartzCore",
            "CoreText"
        ]
    },
    "dependencies": {
        "RegexKitLite": [
            "~>4.0"
        ],
        "AFMacros": [],
        "NSString-HTML": []
    }
}

Pin It on Pinterest

Share This