tags:

views:

63

answers:

1

Hi, i am using Following code in appdelegate.m file..but it did not work..?

      OthersController *mm_OthersController = [[OthersController alloc] init];
      [mm_OthersController tScreen];
   [mm_OthersController release];

when i put break point, it goes to the function tScreen correctly....but i can get output..?if i call the method "tScreen" from view willappear of OthersController, it works fine.... the method in OthersController.m file

 -(void)tScreen
{

 [self.navigationController setToolbarHidden: NO animated: NO];

 self.navigationController.toolbar.barStyle = UIBarStyleBlack;
}

any help pls......?

A: 

You should check whether you are doing this after adding the navigation controller to your window or before it.

Follow it like this:

[window addSubview:[navigationController view]];

 OthersController *mm_OthersController = [[OthersController alloc] init];
      [mm_OthersController tScreen];
   [mm_OthersController release];


[window makeKeyAndVisible];

Hope this helps!

Madhup
i did not include navigationController... OthersController is in IB..and also set as Navigation controller in tab bar
Mikhail Naimy