我UITabbarController用UINavigationController它.我有一个子类UIView,我分配的view的UIViewController中navController.这是非常标准的东西,对吗?我就是这样做的
_productCategoryView = [[ProductCategoryView alloc] initWithFrame:self.view.frame];
self.view = _productCategoryView;
Run Code Online (Sandbox Code Playgroud)
这view有UITableView作为subView
_productCategoryTableView = [[UITableView alloc] initWithFrame:self.frame style:UITableViewStylePlain];
_productCategoryTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_productCategoryTableView.backgroundColor = [UIColor clearColor];
[self addSubview:_productCategoryTableView];
Run Code Online (Sandbox Code Playgroud)
为了调试我正在设置self.backgroundColor = [UIColor blueColor]视图.
从上面的初始化tableView可能会认为视图和表的frame相同.然而,当我进入时iOS 7,视图的原点设置在后面UINavigationBar.这是可以理解的,因为我self.navigationBar.translucent = YES;在我的子类中设置UINavigationController.但我不明白的是桌子是怎么坐在下面的navBar?难道它也不应该从(0, 0)哪个开始navBar?见Scenario 1下面的截图.注意背后的蓝色色调navBar

现在,我在导航堆栈上的push另一个viewController,只需使用 …
这似乎是一个奇怪的问题,但我仍然面临很多问题.我有一个在ios6中开发的应用程序,现在我必须将它迁移到ios7.有几个问题:应用程序的所有视图都向上移动,应用程序底部留有空间.剩下的空间等于状态栏.表视图WrraperClass存在错误.
帮帮我.