开发者

How to popup a view from bottom?

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

How to popup a view from bottom?

Any help is welco开发者_JS百科me,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];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜