UIViewAutoresizingFlexibleWidth

UIViewAutoresizingFlexibleWidth

就图像而言,在视图上设置时,UIViewAutoresizingNone值对应于哪个图像?

最佳答案

您说对了,所显示的图像等效于UIViewAutoresizingNone

您可以从接口生成器中看到自动调整大小,

虽然以编程方式,但这些撑杆的行为与上图“相反”,例如,

这是AutoSizingMask的一些示例-以编程方式vs XIB。

  • (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)等同于


  • (UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin |UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin)等同于


  • UIViewAutoresizingNone
  • 等效


  • (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin)等同于


  • (UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin)等同于


  • (UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)等同于


  • (UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)等同于


  • (UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleWidth)等同于


  • (UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleLeftMargin)
  • 10-01 16:35