I have created a table view with prototype cells in a Storyboard with the "Use Autolayout" unchecked in Xcode 5.
The cells are UITableViewCell subclasses, mainly to add IBOutlets and no code inside. The result is a messed layout. I tried changing the Autoresizing masks with no luck. Also tried this.
If I however implement an empty layoutSubviews
it shows ok. Any idea of what's going on?
Is auto layout still enabled despite unchecking it?
Edit:
More details...
@interface SettingDefaultTableViewCell : UITableViewCell
@property (nonatomic, weak) IBOutlet UILabel *label;
@property (nonatomic, weak) IBOutlet UIImageView *imageView;
@property (nonatomic, weak) IBOutlet UIView *backgroundView;
@end
@implementation SettingDefaultTableViewCell
- (void)layoutSubviews
{
// Emtpy implementation to fix weird layout bug
}
@end
Storyboard with Autolayout disabled:
Result when layoutSubviews
fix above is not used:
Edit 2:
- The cell is set to not autoresize subviews.
- While the above should be enough to prevent subviews from getting auto-adjusted, also all autoresizing masks are set to flexible right and bottom margin only.
- Only the > mark is set to flexible left margin. No flexible width or height.