transforming UITableView to support right to left languages

匿名 (未验证) 提交于 2019-12-03 08:54:24

问题:

I have a UITableView, I want to apply some transformation on it so it will support right to left languages, what I did is the following:

       for(UITableViewCell *cell in self.RSSNewsTableView.visibleCells) {         cell.transform = CGAffineTransformMakeRotation(180*0.0174532925);         cell.textLabel.transform = CGAffineTransformMakeRotation(180*0.0174532925);                cell.detailTextLabel.transform = CGAffineTransformMakeRotation(-M_PI);                      cell.textLabel.textAlignment = UITextAlignmentRight;        // cell.transform = CGAffineTransformMakeRotation(2*M_PI);      } 

and what I got is the following:

what is the right transformation for the detailTextLabel so it will be placed correctly under cell's textLabel ?

回答1:

i personally would not implement that with a affine transformation, just create new labels and custom views and position them yourself with the autoresizingmask

i looked at my iPhone with the arabic language and the default navigation still goes to the left, so there is no need to turn the green disclosure indicator in your screenshot.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!