开发者

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

开发者 https://www.devze.com 2023-01-20 01:20 出处:网络
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?

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

精彩评论

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