Question

I am using 2 views in navigation controller in a tab bar. In that First view controller in navigation should automatically call the second view controller without showing First view controller ( by pushing pushviewcontroller on viewdidAppear).

The issue is when i click on the tab bar on first time it goes to Second view controller without any showing of First view correctly . but when I press the tab bar again it show the First view with transition style(popviewcontroller).

Can anyone suggest me what i have went wrong?

Thanks in advance

Regards, sathish

Was it helpful?

Solution

If you are using initWithNibName to create your view controllers use the viewDidLoad event instead the viewDidAppear.

OTHER TIPS

just use call second view controller in -(void)ViewwillAppear:(BOOL)Animated then it not give any problem

Why would you want to do that?

Add the second view as a subview really, or if you really must put it in viewWillAppear:(BOOL)animated - but calling it every time is really inefficient. But again, why would you want to push a view controller over another view controller?! Why don't you just make the second view controller the root view controller?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top