How to get device current orientation in an App Extension, I have tried below two methods but no success.
It always return UIDeviceOrientationUnknown
<
I found a way where we can calculate our device orientation like this way in (App Extension)
- (void)viewDidLayoutSubviews
{
if(self.view.frame.size.width > self.view.frame.size.height)
NSLog(@"Landscape");
else
NSLog(@"Portrait");
}
It gives me right orientation but still not get as device is LandscapeLeft or LandscapeRight as well as Portrait or PortraitUpsideDown.
Still need help.