Adding ellipsis for ios nsstring
Usage Example:
NSString *testString = @"Hello world in iOS is not so good, it need some animation to make it look better, I love iOS";
[testString stringByTruncatingToWidth:100 withFont:[UIFont systemFontOfSize:12]];
Adding to your project:
- Clone the repository or downlaod the zip file
- Drag the .h and .m files into your project
- Include #import "NSString+TruncateToWidth.h" in the file where you want to truncate and add ellipsis
- Call the function as show in the above example