There are several table cells in my application that vary in height. Cells can also have UIButton, to be the button for expanding details (round, blue with arrow) as their accessories.
Depending on the height of the cell, the type of accessory is located in different ways. At first, I thought it was my layout code for my cell that was causing the problem, so I installed a quick independent test that vanilla uses UITableCellsto remove the possibility that this might be my mistake.
I set the view in the interface builder and simply added the table view cells to the view, set their heights to different values, and then added each detail button. Nothing more, nothing less.
Here is what I see:
UITableViewCells with different x values http://jasarien.com/jing/accessoryView_x_difference.png
I added size guides (thanks to Xscope ) so that you can see the difference in the x positions of the accessories.
Height:
- top 37px
- mid 68px
- bottom 44px (default, pristine height)
If I increase the height in excess of 68 pixels, the accessory view no longer moves to the left.
This is mistake? Is there any way to prevent this?
Here is a test project to reproduce.
TableViewCellHeightsTest.zip