문제

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

도움이 되었습니까?

해결책

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

다른 팁

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?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top