ios - 如何为阿拉伯语希伯来语实现带 RTL 的 iOS?

标签 ios arabic right-to-left hebrew

我正在 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,以及其他一些功能。

更多信息在这里:https://developer.apple.com/library/prerelease/ios/documentation/MacOSX/Conceptual/BPInternational/SupportingRight-To-LeftLanguages/SupportingRight-To-LeftLanguages.html#//apple_ref/doc/uid/10000171i-CH17

关于ios - 如何为阿拉伯语希伯来语实现带 RTL 的 iOS?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23497553/

相关文章:

ios - 在第一个 View Controller 中添加 'addObserver' (NSNotificationCenter),在第二个 View Controller 中处理

php - 具有 scandir php 功能的阿拉伯语

javascript - 方向为 rtl 时的 jQuery.scrollLeft() - 不同浏览器中的不同值

css - 如何在右侧设置宽度适合内容 - 动态内容宽度

Java 在文本区域右侧显示文本

ios - Firebase 商店 : trying to store to local file gives an error

iOS swift UIImageView 在 tableView 单元格中更改图像

ios - 如何从 Compact :Regular to Any:Any 传输接口(interface)

c# - 如何将阿拉伯文本转换为 SAMPA 语音?

python - 阿拉伯语文本的 Kivy 文本输入