views:

124

answers:

2

When click a button,I want to popup a view form bottom,like this!

http://i40.tinypic.com/2lapxdi.png

Any help is welcome,thanks.

+2  A: 

Use the presentModalViewController:animated: method. See the docs for details on its use.

Ian Henry
A: 

If you want to reproduce what is seen in the screenshot you linked you can also put a picker in a UIActionSheet like so:

UIActionSheet datePickerSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Select     Date",@"Selecte Date")
                                              delegate:self
                                     cancelButtonTitle:NSLocalizedString(@"Done",@"Done")
                                destructiveButtonTitle:NSLocalizedString(@"Cancel",@"Cancel")
                                     otherButtonTitles:nil];
// Add the picker
datePicker = [[UIDatePicker alloc] initWithFrame:CGRectMake(0,185,0,0)];

[datePicker addTarget:self action:@selector(dateDidChange) forControlEvents:UIControlEventValueChanged];

[datePickerSheet addSubview:datePicker];
[datePickerSheet showInView:self.view];
[datePickerSheet setBounds:CGRectMake(0,0,320, 700)];



[datePicker release];
[datePickerSheet release];
Eric Schweichler
thank you very much.
HelloWorld