objective c - How it is possible to make one view controller to be viewed in Portrait view in iPhone -


i developing app, display number of books fetched server , user read through book whenever wants. in every book supposed add simple games. here, have done is, app start in landscape view , works fine. now, want game view controller (not other vc ) should load in portrait view. googled , can't find real solution. appreciated. thanks.

by default, uiviewcontroller class displays views in portrait mode only. support additional orientations, must override shouldautorotatetointerfaceorientation: method , return yes orientations subclass supports.

so have override shouldautorotatetointerfaceorientation: function in view controller view in portrait:

- (bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation {     return (interfaceorientation == uiinterfaceorientationportrait); } 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -