FBObjcTool 0.2.0

FBObjcTool 0.2.0

Maintained by cocoazxy.



  • By
  • cocoazxy

FBObjcTool

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

FBObjcTool is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'FBObjcTool'

Author

zhangxueyang, [email protected]

License

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

How To Use

设置添加完行间距的属性

NSString *thirdStr = @"测试一下数据测试一下数据测试测试一下数据测试一下数据测试测试一下数据测试一下数据测试测试一下数据测试一下数据测试测试一下数据测试一下数据测试测试一下数据测试一下数据测试测试一下数据测试一下数据测试测试一下数据测试一下数据测试测试一下数据测试一下数据测试测试一下数据测试一下数据测试测试一下数据测试一下数据测试测试一下数据测试一下数据测试测试一下数据测试一下数据测试eeeee";
NSMutableAttributedString *attribute2 = [thirdStr fb_setLineSpaceWithSize:itemSize font:font lineSpace:kLineSpace];
self.thirdLab.attributedText = attribute2;

获取行高

CGSize thirdSize = [thirdStr fb_boundingRectWithSize:itemSize font:font lineSpacing:kLineSpace];