CyberK
CyberK

Reputation: 1578

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 anyone has a good tutorial or sample code of how to do this?

This is the screen I want: alt text

Upvotes: 0

Views: 681

Answers (2)

user467105
user467105

Reputation:

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.

Upvotes: 2

Sid
Sid

Reputation: 9536

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.

Upvotes: 0

Related Questions