InterfaceOrientation of UIViewController is deprecated and the Document suggest to use [[UIApplication sharedApplication] statusBarOrientation]
, but there is no sharedApplication in an extension of iOS 8.
As @Retro mentioned, in most circumstances, you can use self.traitCollection.verticalSizeClass
or self.traitCollection.horizontalSizeClass
in a UIViewController to get orientation information.