Questions tagged «autoresizingmask»

4
以编程方式自动调整遮罩大小与Interface Builder / XIB / NIB
我当时(可能是错误的)假设是,在xib中启用正确的边距指示符等效于使用UIViewAutoresizingFlexibleLeftMargin内部代码,依此类推。 因此,我曾经根据此快照进行思考: 今天晚些时候,我不得不交叉核对,偶然发现了这个线程。 还有苹果文档,该文档的标题为“使用自动调整大小规则自动处理布局更改”部分,其标题在此链接中:https : //developer.apple.com/library/content/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/CreatingViews/ CreationViews.html 因此,我现在有了一个新的概念,即关于以编程方式设置自动调整大小的遮罩等同于xib设置的想法: 方案1:仅设置(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)等同于: 在XIB? 方案2:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin)在代码中进行设置等效于: 在XIB? 我的2个新场景是否正确?我现在在我的理解范围内吗?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.