ios - Restrict orientation per view controller -


i want in each view controller orientation supports , restrict them. tried:

none of solutions seems work. or miss important? how can restrict orientation view controller landscape only, view controller b portrait , view controller c can shown in available orientations?

overriding getsupportedinterfaceorientations() in view controller should solve problem:

public override uiinterfaceorientationmask getsupportedinterfaceorientations ()     {   return uiinterfaceorientationmask.landscaperight; } 

the orientations return here intersected app's allowed orientations (project properties) or allow in app delegate. sure specify all orientations there or maximum set of orientations want support.

see here documentation.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -