【发布时间】:2010-02-11 18:51:52
【问题描述】:
我正在尝试在 iPad 上使用 presentModalViewController 显示登录屏幕。
LoginFormController *controller = [[[LoginFormController alloc] initWithNibName:@"LoginFormView" bundle:nil] autorelease];
[controller setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
[controller setModalPresentationStyle:UIModalPresentationFormSheet];
[self controller:loginFormController animated:YES];
无论我在 Interface Builder 中将视图设置为什么大小,它总是会调整为大约 540x620。但登录屏幕只不过是两个文本字段和一个按钮。所以我只需要它是460x240。
有人知道调整大小的方法吗?
【问题讨论】:
-
不确定为什么响应是无法完成或您应该使用警报。这里提供了一个完美的答案:stackoverflow.com/questions/2457947/…
标签: ipad model-view-controller