更改UIAlertView大小 [英] Change UIAlertView size

查看:104
本文介绍了更改UIAlertView大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的cocos2d游戏,我不能改变大小的uialertview,我已经改变状态barorientation到横向,现在想要初始alertview与框架,initwithframe方法不影响alertview的大小,每次大小的警报同样,有什么办法改变它吗?

解决方案

这里是我做的。在控制器中创建uialertview。然后覆盖你的控制器中的下面的类(在设置uialertview委托后...例如myalertview.delegate = viewcontroller)

  (void)willPresentAlertView:(UIAlertView *)alertView {
[alertView setFrame:CGRectMake(1,20,2700,400)];
}

框架尺寸应在此后更改。


In my cocos2d game i can't change size of uialertview, i have changed statusbarorientation to landscape, and now want to init alertview with frame, and initwithframe method does not affect the size of alertview, every time the size of alert is the same, is there any way to change it ?

解决方案

Here is what i did. Create your uialertview in your controller. then override the following class within your controller (after setting the uialertview delegate ... ie. myalertview.delegate=viewcontroller)

- (void)willPresentAlertView:(UIAlertView *)alertView {
    [alertView setFrame:CGRectMake(1, 20, 2700, 400)];
}

the frame size should change after this.

这篇关于更改UIAlertView大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆