问题:我在按钮中设置的文本(希伯来语)显示相反。
例如:
NSString *title = @"עמוד הבית"; //This is right-to-left
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
[button setTitle:title forState:UIControlStateNormal];所以:在我的模拟器里我看到:
//This is left-to-right

它怎么能修好?
如何正确显示文本?
应用程序支持iOS 6和iOS 7
发布于 2016-01-04 16:05:59
在使用UIButton时,对我起作用的是:
if ([UIView userInterfaceLayoutDirectionForSemanticContentAttribute:button.semanticContentAttribute] == UIUserInterfaceLayoutDirectionRightToLeft)
{
button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
}值得阅读的链接:
发布于 2013-12-21 12:13:50
如果您使用"#x200F“来解决您的问题,那么在添加所有这些之后,添加string.There是一个问题,这很奇怪,如果您知道answer.Please,共享
https://stackoverflow.com/questions/20359505
复制相似问题