gpt4 book ai didi

ios - 将 UITableView 方向更改为从右到左

转载 作者:搜寻专家 更新时间:2023-10-30 21:49:08 24 4
gpt4 key购买 nike

我开发了一个 iOS 应用程序,我的母语是波斯语(一种从右到左的语言)。如何在 iOS 编程中将 UITableView 方向更改为从右到左?

具有 RTL 方向的 UITableView 具有:

  • 图标在右边
  • TableCell 细节和按钮在左边
  • TableView 页眉和页脚右对齐

像这样:

enter image description here

是否有任何 UI 或编程方式可以做到这一点?

最佳答案

在 Swift 上试试这个

tableView.semanticContentAttribute = .forceRightToLeft

或在 StoryBoard 单元格属性(语义下拉列表)中选择“强制从右到左”

enter image description here

关于ios - 将 UITableView 方向更改为从右到左,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38035668/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com