1

我在我的 iPhone 应用程序中使用 OHAttributeLabel 但现在我收到警告

UITextAlignment is deprecated : You should use setTextAlignment:lineBreakMode:on your NSAttributedString instead

请任何人建议我如何解决它。

4

2 回答 2

1

尝试这个

[label setTextAlignment:NSTextAlignmentCenter]; 

这是工作

于 2012-11-19T22:41:54.330 回答
0

// 假设标签是 OHAttributedLabel 的 IBOutlet(子类哦 UILabel)

label.textAlignment = UITextAlignmentJustify; 

// 仅此而已,OHAttributedLabel 为您完成所有需要的工作!

于 2012-08-29T13:30:05.393 回答