UINavigationController back button problem in landscape mode?

这一生的挚爱 提交于 2019-12-06 07:58:19

问题


my iphone application supports portrait mode earlier, now i want to support land scape mode also.

everything is working fine in my application except the navigation controller back button. i have used tableviews in navigaton conroller, when i click back button in landscape mode view is getting poped and its loading its previous view but animation is strange.

i have given default animation but, in landscape mode view is is animating upside down instead of default left to rite when i click back button.

does anyone faced this kind of problem??? thanks in advance.


回答1:


i understood the problem and below is the solution... each viewcontroller which i am pushing into navigation controllers should have the following delegate method.

each view controller should confirm that it is supporting the orientation change

  • (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { self.orientation = interfaceOrientation; return YES; }


来源:https://stackoverflow.com/questions/3045925/uinavigationcontroller-back-button-problem-in-landscape-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!