【问题标题】:Autosizing UIImageView in code在代码中自动调整 UIImageView
【发布时间】:2011-07-10 06:14:49
【问题描述】:

我正在将自定义 UITableViewCell 从 Interface Builder 移动到代码中,但我不确定如何复制上图中的自动调整大小。

self.autoresizingMask = (UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin); 吗?

【问题讨论】:

标签: iphone objective-c autosize


【解决方案1】:

没有。自动调整大小夹在边缘,并且具有灵活的高度和宽度,因此应该是,

self.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;

【讨论】:

    猜你喜欢
    • 2019-10-28
    • 2013-08-07
    • 1970-01-01
    • 1970-01-01
    • 2012-02-09
    • 2014-03-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多