File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change 4848 #define kCFCoreFoundationVersionNumber_iOS_8_0 1129.15
4949#endif
5050
51+ #ifndef __IPHONE_8_0
52+ #define __IPHONE_8_0 80000
53+ #endif
54+
5155
5256static const CGFloat kPadding = 4 .f;
5357static const CGFloat kLabelFontSize = 16 .f;
@@ -300,11 +304,20 @@ - (void)handleMinShowTimer:(NSTimer *)theTimer {
300304#pragma mark - View Hierrarchy
301305
302306- (BOOL )shouldPerformOrientationTransform {
303- BOOL isPreiOS8 = NSFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_8_0 ;
304- // prior to iOS8 code needs to take care of rotation if it is being added to the window
305- return isPreiOS8 && [self .superview isKindOfClass: [UIWindow class ]];
307+
308+ #if (__IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_8_0)
309+ static BOOL isPreiOS8SDK = YES ;
310+ #else
311+ static BOOL isPreiOS8SDK = NO ;
312+ #endif
313+
314+ BOOL isPreiOS8 = NSFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_8_0 ;
315+ BOOL transformationRequired = isPreiOS8 || isPreiOS8SDK;
316+
317+ return transformationRequired && [self .superview isKindOfClass: [UIWindow class ]];
306318}
307319
320+
308321- (void )didMoveToSuperview {
309322 if ([self shouldPerformOrientationTransform ]) {
310323 [self setTransformForCurrentOrientation: NO ];
You can’t perform that action at this time.
0 commit comments