Skip to content

Commit

Permalink
add backward compatability with xcode 5
Browse files Browse the repository at this point in the history
  • Loading branch information
skywinder committed Sep 18, 2014
1 parent 4f08113 commit 0861e2c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Pickers/AbstractActionSheetPicker.m
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ - (CGSize)viewSize
return CGSizeMake(320, 320);
}

#if defined(__IPHONE_8_0)
if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_7_1) {
//iOS 7.1 or earlier
if ( [self isViewPortrait] )
Expand All @@ -401,6 +402,11 @@ - (CGSize)viewSize
//iOS 8 or later
return [[UIScreen mainScreen] bounds].size;
}
#elif
if ( [self isViewPortrait] )
return CGSizeMake(320 , IS_WIDESCREEN ? 568 : 480);
return CGSizeMake(IS_WIDESCREEN ? 568 : 480, 320);
#endif
}

- (BOOL)isViewPortrait
Expand Down

0 comments on commit 0861e2c

Please sign in to comment.