开发者

Autosizing UIImageView in code

开发者 https://www.devze.com 2023-03-18 23:20 出处:网络
I am moving a custom UITableViewCell from Int开发者_StackOverflow中文版erface Builder and into code, but I\'m unsure of how to copy the autosizing in the image above.

Autosizing UIImageView in code

I am moving a custom UITableViewCell from Int开发者_StackOverflow中文版erface Builder and into code, but I'm unsure of how to copy the autosizing in the image above.

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


No. The autosizing clamps to the edges and has flexible height and width so it should be,

self.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号