开发者

iPad - Resizing a modal UIViewController

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 se开发者_StackOverflow中文版tModalPresentationStyle: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?


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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜