简体   繁体   中英

UITableViewCell accessory not positioned correctly after rotating UITableView on iPad

I have an iPhone app that I've converted to a universal app .

The app works fine in all orientation on the iPhone. However on iPad when I rotate a table view, the UITableViewCell accessory is not repositioned correctly (see images below). I'm using a standard UITableViewCell of type UITableViewCellStyleSubtitle. The rest of view is drawn correctly and uses all the iPad real estate. The XIB files are the same for the iPad and iPhone, except for the MainWindow.xib.

After scrolling down and backup, the accessory are redrawn at the correct position.

Does anyone know what could be causing that issue?

EDIT: If I remove the index list on the right, the problem disappears!

Portrait orientation:

替代文字

And when I rotate to landscape:

替代文字

After scrolling down 2 cells and up again, the cell is refreshed and the accessory drawn at the correct position:

替代文字

This very well could be a bug and I'd recommend you file a bug report at https://bugreport.apple.com/

But for what it's worth, I don't think you should use a disclosure indicator along with an index -- none of the Apple apps feature this pattern. I was doing this myself until I noticed how Apple avoided it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM