iPhone中的从右到左UI(希伯来语) [英] Right to Left UI in iPhone (Hebrew)

查看:159
本文介绍了iPhone中的从右到左UI(希伯来语)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力在iPhone应用程序中创建RTL UI。该框架似乎没有任何RTL语言支持。
唯一的是标签内的对齐,这很好,但它与其他控件行为冲突。

I'm struggling in creating a RTL UI in iPhone application. The framework doesn't seem to have any support for RTL languages. The only thing is the alignment inside labels, which is nice, but it conflicts with other controls behaviour.

问题是:
有没有RTL TableView的工作代码?将处理公开按钮的东西放在左边,部分标题要对齐,索引视图要左对齐?

The question is: Is there a working code for a RTL TableView? Something that would handle the disclosure buttons to be on the left, section titles to be right aligned, index view to be left aligned?

据我所知,我无法移动tableview的索引视图,我必须覆盖一些自定义控件...

As far as I understand I cannot move the index view of the tableview, i have to overlay some custom control...

任何建议/指针/示例?

Any suggestions/pointers/examples?

ps这不是这个问题的重复: UITableView的从左到右对齐
因为我正在寻找的是更深层次的定制,而不仅仅是一种新型的CellView。

p.s. this is not a duplication of this question: Right to Left Alignment for UITableView since what I am looking for is a deeper customization, not just a new type of CellView.

(更新:3月10日)现在 - 我已经删除了完全支持来自 tableView indexView ,我自己将单元格实现为自定义视图(左侧有显示按钮) ),并自定义表格的页眉/页脚。唯一剩下的就是索引视图

(Update: Mar 10) For now - I've removed support for indexView from the tableView at all, implemented the cells as custom views by myself (with disclosure buttons on the left), and customized the header/footer of the table as well. the only thing that is left is the Index View.

推荐答案

我不要相信有一种正确的方法,但这里有一个解决方案:

I don't believe that there is a "correct" way of doing this, but here is one solution:

在视图中,创建一个UIView并向其添加一个UITableView 。将UIView添加为主视图的子视图,并将其边界指定为偏离屏幕左侧,以便除索引之外的所有索引都被主视图剪切。现在你所要做的就是在触摸子视图的索引时添加一些代码来同步两个表。

Within the view, create a UIView and add a UITableView to it. Add the UIView as a subView of your "master" view and specify its bounds to be off of the left side of the screen so that all but the indices is clipped by the "master" view. Now all you have to do is add a bit of code to synchronize the two tables when an index from the subview is touched.

显然这不是最好的解决方案,但是它是可行的。

Obviously this is not the best solution, but it is one that could work.

祝你好运。

这篇关于iPhone中的从右到左UI(希伯来语)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆