UIKit和Foundation类集合的一组分类。
UIFont *font = [UIFont fontWithName:@"FontAwesome" size:32];
UIImage *iconImage = [UIImage lla_imageWithFont:font named:@"\uf09a" maskColor:[UIColor blueColor]];
...
UIFont *maskedImage = [UIImage lla_imageNamed:@"Image" maskColor:[UIColor redColor]];
...
UIImage *existingImage = ...;
UIImage *maskedImage = [existingImage lla_maskWithColor:[UIColor redColor]];
请参阅各个头文件以获取完整文档。
CocoaPods是建议安装LLACategories的方法。只需在您的Podfile中添加以下行:
pod 'LLACategories'
否则,您可以直接将LLACategories下的文件添加到项目中。
LLACategories已在iOS7上测试,且需要自动引用计数(ARC)。
Lukas Lipka
LLACategories在MIT许可证下可用。有关更多信息,请参阅LICENSE文件。