0

I have a tabbar app with only 1 tab.

Here is my didFinishLaunchingWithOptions:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
OneDayViewController *oneDayView = [[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.

yuji
  • 16,695
  • 4
  • 63
  • 64
Mun
  • 1

1 Answers1

0

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...

Chandan Shetty SP
  • 5,087
  • 6
  • 42
  • 63
  • self.window is a subclass of UIView – Chandan Shetty SP Mar 28 '11 at 13:05
  • i think we have this order: `window` --> `tabbar controller view` --> `one day view`. So i think `superView` must be something of `tabbar controller view` (because i get it from `OneDayView`), but dont know what it is. Anyway, i just want to remove `OneDayView` out of Tabbar and add another view (App has only 1 tabbar) – Mun Mar 29 '11 at 01:37