A simple demo to show how to force orientation programmingly on iOS. These 2 solutions works on iOS 8 as well.