Autosizing UIImageView in Code

autosizing

I am moving a custom UITableViewCell from Interface Builder and into code, but I'm not sure how to copy the auto image in the image above.

Will it be self.autoresizingMask = (UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin); ?

+4
source share
1 answer

No. Automation clamps the edges and has a flexible height and width so that it is,

 self.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; 
+14
source

All Articles