Commit 383b77e5 authored by Soomin Lee's avatar Soomin Lee Committed by Jean-Baptiste Kempf

iOS: Fix the forced CollectionView on initial launch

UIDeviceOrientationUnknown wasn't checked therefore UIDeviceOrientationIsPortrait() method
returned false on inital launch causing the CollectionView even when the user was in Portrait.
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent e8f96e23
...@@ -498,7 +498,9 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData"; ...@@ -498,7 +498,9 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
{ {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
UIDevice *currentDevice = [UIDevice currentDevice]; UIDevice *currentDevice = [UIDevice currentDevice];
BOOL isPortrait = UIDeviceOrientationIsPortrait(currentDevice.orientation); UIDeviceOrientation orientation = currentDevice.orientation;
BOOL isPortrait = (orientation == UIDeviceOrientationUnknown) ? self.usingTableViewToShowData : UIDeviceOrientationIsPortrait(orientation);
if (self.isEditing) { if (self.isEditing) {
[self setEditing:NO animated:NO]; [self setEditing:NO animated:NO];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment