【问题标题】:Resizing image view in Portrait mode and landscape mode在纵向模式和横向模式下调整图像视图的大小
【发布时间】:2011-09-05 05:04:40
【问题描述】:

谁能告诉我如何调整图像视图的大小以在纵向和横向模式下显示图像。我想全屏显示它们。请帮助

谢谢, 克里斯蒂

【问题讨论】:

  • 你是用interface builder还是用代码做的?

标签: iphone cocoa-touch xcode ipad uiimageview


【解决方案1】:

像这样使用

imageView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;

并从上面的代码中设置leftmargin,right margin

【讨论】:

  • 你也可以告诉我如何为事件编写代码,即当我在文本框中输入任何内容时单击键盘上的返回
  • @Christina:我建议你提出一个新问题以获得回应。
  • 问新问题..我没有得到你想问的问题
【解决方案2】:

嘿,在 didOrientationChange 方法中更改图像视图的框架..就这么简单...!!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-06-09
    • 1970-01-01
    • 2011-08-07
    • 1970-01-01
    • 2013-05-12
    • 2018-04-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多