autoResizingMask 中的错误
我已经实现了一个小的 viewDidLoad() 来显示自动调整大小的图片, 但它不起作用,请有人帮助我并说出错误是什么 这段代码在第 3 行和第 4 行???
imageView = [[UIImageView alloc] initWithImage:img];
imageView.frame = self.view.frame;
imageView.autoresizingMask = UIViewAutoresizingFlexibleHeight;
imageView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
我希望有人能帮助我?
i have implemented a small viewDidLoad() to show an Picture with autoresizing,
but it doesn't work, could please someone help me and say what is the mistake in
this code in line 3 and 4????
imageView = [[UIImageView alloc] initWithImage:img];
imageView.frame = self.view.frame;
imageView.autoresizingMask = UIViewAutoresizingFlexibleHeight;
imageView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
i hope someone could help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我没记错的话,您应该按照以下方式执行此操作:
您执行此操作的方式是覆盖 autoresizingMask。
If im not mistaken you should do it the following way:
The way you do it, you override the autoresizingMask.