改变uialertview大小的问题 [英] problem in changing size of uialertview

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

问题描述

你好
我有一个alertview,我想通过cgrectmake属性改变大小,但它不会发生。
它只取默认大小。

Hello I am having a alertview and i want to change the size by cgrectmake property but it does not happen . It just take the by default size.

我试过以下代码。

- (void)viewDidLoad {
[super viewDidLoad];
UIAlertView* find = [[[UIAlertView alloc] init]initWithFrame:CGRectMake(0,0,300,200)];
[find setDelegate:self];
[find setTitle:@"Sample Alert"];
[find setNeedsLayout];
[find show];
[find release];

}

提前致谢。

推荐答案

要达到你想要的东西,在你的代码,后:

To achieve what you want, in your code, after:

[find show];

add:

find.frame = CGRectMake(0,0,300,200);



这是不漂亮,虽然,我建议你使用ActionSheets。

It's not pretty though, I suggest you use ActionSheets.

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

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