下面是代码: -NSTextAlignmentJustified抛出错误
lblValue
是的UILabel的一个实例。
[lblValue setText:@"Some Big String"];
[lblValue setTextAlignment: NSTextAlignmentJustified];
错误:*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'textAlignment does not accept NSTextAlignmentJustified'
NSTextFieldAlignement只适用于iOS6的。如果您的目标是iOS5或iOS4.3,则无法使用。 – Larme 2013-04-22 10:23:08