Question

I am trying to display a login screen using presentModalViewController on iPad.

LoginFormController *controller = [[[LoginFormController alloc] initWithNibName:@"LoginFormView" bundle:nil] autorelease];
[controller setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
[controller setModalPresentationStyle:UIModalPresentationFormSheet];
[self controller:loginFormController animated:YES];

No matter what size I set the view to be in Interface Builder, it always resizes to about 540x620. But the login screen is nothing more than two text fields and a button. So I only need it to be 460x240.

Does anybody know of a way to resize this?

Was it helpful?

Solution

Try reading the iPad HIG section on Modal Views. Its pretty clear why that won't work. No body can really tell you much when not in Apple's dev forms since we are under NDA. However the solution I would use if I were you isn't iPad specific but rather what quite a few iPhone apps have been doing for a while. Use a UIAlert view and put your two text fields in that? The down side is you can't use IB to lay it out. Tutorial

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top