我正在将自定义UITableViewCell从Interface Builder移动到代码中,但我不确定如何在上面的图像中复制自动调整大小。
是self.autoresizingMask = (UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin);
吗?
答案 0 :(得分:14)
没有。自动调整夹到边缘并具有灵活的高度和宽度,因此它应该是,
self.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;