I have a custom UITableViewCell that contains several UIButtons. The position of each button depends on the width of the cell. I set autoresizingMask = UIViewAutoresizingFlexibleWidth so that it correctly adjusts the cell width and button position when the application is launched from the device in landscape or portrait mode.
The problem is that the device rotates from one mode to another, the buttons do not adjust the position, because the UITableViewCell is reusable. In other words, the cell is not initialized based on the new UITalbeView width, because the cell function initWithStyle is called before the device is rotated and is not called again after the device is rotated. Any suggestions?
iphone uitableview rotation reusability
Wayne lo
source share