我正在 Xcode 5 目标 iOS 7.1 上开发一个应用程序,单个 View 上只有两个项目图像和标签,启用了自动布局,并使用具有尾随和前导属性的“添加缺失约束”设置了约束。
根据下面的 Apple 站点,当我更改为阿拉伯语时,此组件应该翻转,而无需对代码进行更多修改,仅在自动布局的帮助下,但这没有用 https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/AutolayoutPG/Introduction/Introduction.html#//apple_ref/doc/uid/TP40010853-CH13-SW1
我在这里搜索其他成员的问题,发现其他人说我应该为每种语言实现不同的 Storyboard,就像那个链接中提到的那样 https://developer.apple.com/library/ios/documentation/MacOSX/Conceptual/BPInternational/BPInternational.html#//apple_ref/doc/uid/10000171-SW1
在我的主 Storyboard中,我只能在本地化下找到基础和英语,如何添加希伯来语和阿拉伯语?
我发现了以下问题,但它们并没有增加太多支持: Multi Language Design support in IOS Right to left and left to right languages in the same app?
Flip UIImageViews for Right to Left Languages
iOS : How to build a bi-language iOS native application
Using Constraints in Auto Layouts of Objective C to support RTL Languages
RTL (Right-to-left) via auto layout broken on iOS 6.1 / iOS 7.0?
Right to Left UI in iPhone (Hebrew)
此链接与我的实现类似,但对我来说效果不佳 AutoLayout + RTL + UILabel text alignment
最佳答案
聚会有点晚了,但 iOS 9 已经免费内置了很多这些东西。
从 iOS 9 开始,标准的 UIKit 控件会以从右到左的语言(例如 UITabBar、UINavigationBar、UITableView 等)自动翻转,这与自动布局相结合可以让您的应用在 RTL 上“正常工作”。
iOS 9 还具有用于翻转定向图像的 API,以及其他一些功能。
关于ios - 如何为阿拉伯语希伯来语实现带 RTL 的 iOS?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23497553/