开发者

How to create a window like the e-mail app that pops up

I want to create a window that pops up like in the email app when you hit New Email.

Does any开发者_StackOverflow中文版one has a good tutorial or sample code of how to do this?

This is the screen I want:

How to create a window like the e-mail app that pops up


Basically it looks like a view controller shown modally with modalPresentationStyle set to UIModalPresentationPageSheet:

SomeViewController *vc = [[SomeViewController alloc] 
    initWithNibName:@"SomeViewController" bundle:nil];
vc.modalPresentationStyle = UIModalPresentationPageSheet;
[self presentModalViewController:vc animated:YES];
[vc release];

On the view controller, at the top is a UIToolbar and the content underneath can be shown in several ways including a UITableView.

In portrait, the modal view will be the full width of the screen.


It's a modal view controller with style as pagesheet.

You have to present whatever you want as a modal view controller after setting it's modal style.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜