浏览代码

library: trust the status bar more the device when checking the current rotation

Felix Paul Kühne 11 年之前
父节点
当前提交
d9757af271
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Sources/VLCPlaylistViewController.m

+ 2 - 1
Sources/VLCPlaylistViewController.m

@@ -122,6 +122,7 @@
 - (void)viewWillAppear:(BOOL)animated
 {
     [super viewWillAppear:animated];
+    [self.collectionView.collectionViewLayout invalidateLayout];
     [self _displayEmptyLibraryViewIfNeeded];
 }
 
@@ -429,7 +430,7 @@
 - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
 {
     if (SYSTEM_RUNS_IOS7_OR_LATER) {
-        if (UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation))
+        if (UIDeviceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation))
             return CGSizeMake(341., 190.);
         else
             return CGSizeMake(384., 216.);