ios - force Portrait mode after being in Landscape mode and tapping back -


i have tabbar app navigationcontroller on each tab. first tab shows list of entries (roomsviewcontroller) navigate detail view (roomdetailviewcontroller). on detail view there's button navigates viewcontroller (photoviewcontroller). have set 1 last viewcontroller supports orientation changes, rest doesn't. works fine, have problem when i'm in landscape mode , go 1 viewcontroller (to roomdetailviewcontroller), stays in landscape mode , looks ugly.

i have being in portrait mode after tapping back.

on ios 5 , below added roomdetailviewcontroller , worked:

[[uidevice currentdevice] setorientation:uiinterfaceorientationportrait]; 

unfortunately doesn't work on ios 6.

any solutions that? in advance

implement method in roomdetailviewcontroller,  -(nsuinteger)supportedinterfaceorientations {     return uiinterfaceorientationmaskportrait; } 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -