调整 UIAlertView 的大小
有什么方法可以调整 UIAlertView 的大小,使其不覆盖选项卡栏?我尝试如下更改其框架属性,但没有成功。
CGRect alertViewFrame = self.alertView.frame;
alertViewFrame.size.height = alertViewFrame.size.height - kTabBarHeight;
self.localizationDisabledView.frame = localizationDisabledViewFrame;
谢谢!
Is there any way I could resize an UIAlertView so it doesn't cover the tab bar? I tried changing its frame property as it follows but it didn't work.
CGRect alertViewFrame = self.alertView.frame;
alertViewFrame.size.height = alertViewFrame.size.height - kTabBarHeight;
self.localizationDisabledView.frame = localizationDisabledViewFrame;
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知,你不能在不让任何人生气的情况下对警报视图进行过多的修改,但你可以尝试:
https://github.com/TomSwift/TSAlertView
这是 UIAlertView 的一个很好的小替代品
As far as i am aware, you can't fiddle to much with alert view without getting anybody att apple review group angry but you can try with:
https://github.com/TomSwift/TSAlertView
It is nice little replacement for UIAlertView
这是我从网上找到的一个解决方案:
注意:您可以设置自己的解决 方案按钮标题的值,以及委托的值(如果您愿意)。当您查看缩放因子 1.35 和 1.35(宽度和高度)时,数字越大,
UIAlertView
就变得越小,反之亦然。Here's one solution which I picked up from the web:
Notes: you can set your own values for the button titles, and for the delegate if you wish. When you look at the scaling factors 1.35 and 1.35 (for width and height), the larger the numbers become, the smaller the
UIAlertView
becomes and vice versa.