2011 by Richard Jung
This software is released under the terms of LGPL.
The nLabel provides a subclass of an UILabel. It auto expends its height depending of the content length and has html trimming feature.
iOS 4.0+
-
Add the following files to your xCode project:
- nLabel.h
- nLabel.m
-
Import the header file where do you want to use it
- Example:
#import "nLabel.h"
- Example:
-
Add the string where do you want, whether in the interface builder or programmatically:
Just add the text with the "setText" selector and the rest will be done by nLabel.
The following options are available:
- trimHTMLTags
- Removes all html tags from the text.
Usage:
nLabel *label = [[nLabel alloc] init];
label.trimHTMLTags = YES;
- HTML trimming supports attributes
- HTML trimming supports CDATA
- HTML trimming supports subtags
- Interface Builder extension