Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

problem in changing size of uialertview

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.

i tried following code.

- (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];

}

Thanks in advance .

like image 915
mrugen munshi Avatar asked Oct 20 '10 06:10

mrugen munshi


1 Answers

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

[find show];

add:

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

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

like image 88
ahmet emrah Avatar answered Nov 12 '22 02:11

ahmet emrah