开发者

What is superView in this case? (Tabbar APP)

I have a tabbar app with only 1 tab.

Here is my didFinishLaunchingWithOptions:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
OneDayViewController *o开发者_如何学JAVAneDayView = [[OneDayViewController alloc] initWithNibName:@"OneDayView" bundle:nil];
tabBarController.viewControllers = [NSArray arrayWithObject:oneDayView];

[self.window addSubview:tabBarController.view];
[self.window makeKeyAndVisible];

return YES; }

In any method in OneDayViewController, I have this code:

UIView *superView = [self.view superview];

Question is: what is superView now? UIView? UIViewController or ... I don't know (sorry about that)

P/S: I ask this because I want to remove OneDayView and add another view to tabbar.

Thanks you very much.


Your superview will be tabBarController.view... (Earlier i have told it is window I was wrong...)

post the code that showing/pushing OneDayViewController... so we can get clear idea about the superview...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜