When click a button,I want to popup a view form bottom,like this!
Any help is welcome,thanks.
When click a button,I want to popup a view form bottom,like this!
Any help is welcome,thanks.
Use the presentModalViewController:animated:
method. See the docs for details on its use.
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];