views:

210

answers:

2

hello guys.. I have used date picker in alert view. As alert view has default height and width, I want to change that... Any one know that how to do? Please convey..!

A: 

Replace CGRectMake parameters with proper values.

UIAlertView *alertView = [[UIAlertView alloc] 
                          initWithFrame:CGRectMake(5, 20, 320, 400)];

You could also subclass UIAlertView.

RaYell
Ya i have tried it but still facing same problem...Thanks RaYell for instant reply..
Mahesh
If `initWithFrame` doesn't work for you then I'd go with `UIAlertView` subclass.
RaYell
Thanks, i have created alert view subclass... now its working fine..
Mahesh
A: 

You can't resize the UIAlertView cleanly.

You could change the .frame after the UIAlertView has been -shown, but the buttons will be wrongly placed.

Why not use a UIPopoverController since you're targeting iPad?

KennyTM
Actually I didnt think on it! Bt its good idea.. I will try it. Thanks.
Mahesh