I have a custom UITableViewCell which contains several UIButtons. Each button\'s frame position is relative to the cell width. I set autoresizingMask=UIViewAutoresizingFlexi
Previous answer has a serious problem.
You should use [UIApplication sharedApplication].statusBarOrientation instead of [UIDevice currebtDevice].orientation because Device orientation has nothing to do with interface orientation - Device orientation is physical rotation based on accelerometer.