使用UIViewcontroller的pushViewController时出现问题

时间:2010-01-25 04:35:41

标签: iphone uiviewcontroller uinavigationcontroller

我的视图填写在导航栏的后面我怎么能在它的底部连续。

这是我的代码

WebViewController *webViewController = [[WebViewController alloc] initWithNibName:@"WebController" bundle:nil];         
[[self navigationController] pushViewController:webViewController animated:YES];
[webViewController release];

alt text

1 个答案:

答案 0 :(得分:0)

看起来它正确调整大小,但原点已关闭。您应该尝试设置WebViewController视图的框架:

CGRect frame = webViewController.view.frame;
frame.origin.x = 0;
frame.origin.y = 0;
[webViewController.view setFrame:frame];