@@ -25,6 +25,10 @@ of this software and associated documentation files (the "Software"), to deal
2525
2626#import " WYPopoverController.h"
2727
28+ #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000
29+ #define WY_BASE_SDK_7_ENABLED
30+ #endif
31+
2832#ifdef DEBUG
2933 #define WY_LOG (fmt, ...) NSLog ((@" %s (%d ) : " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
3034#else
@@ -1316,11 +1320,13 @@ - (CGSize)popoverContentSize
13161320{
13171321 CGSize result = CGSizeZero;
13181322
1323+ #ifdef WY_BASE_SDK_7_ENABLED
13191324 if ([viewController respondsToSelector: @selector (preferredContentSize )])
13201325 {
13211326 result = [viewController preferredContentSize ];
13221327 }
13231328 else
1329+ #endif
13241330 {
13251331#pragma clang diagnostic push
13261332#pragma GCC diagnostic ignored "-Wdeprecated"
@@ -1333,11 +1339,13 @@ - (CGSize)popoverContentSize
13331339
13341340- (void )setPopoverContentSize : (CGSize)size
13351341{
1342+ #ifdef WY_BASE_SDK_7_ENABLED
13361343 if ([viewController respondsToSelector: @selector (setPreferredContentSize: )])
13371344 {
13381345 [viewController setPreferredContentSize: size];
13391346 }
13401347 else
1348+ #endif
13411349 {
13421350#pragma clang diagnostic push
13431351#pragma GCC diagnostic ignored "-Wdeprecated"
@@ -1352,11 +1360,12 @@ - (CGSize)contentSizeForViewInPopover
13521360{
13531361 CGSize result = CGSizeZero;
13541362
1363+ #ifdef WY_BASE_SDK_7_ENABLED
13551364 if ([viewController respondsToSelector: @selector (preferredContentSize )])
13561365 {
13571366 result = viewController.preferredContentSize ;
13581367 }
1359-
1368+ # endif
13601369 if (CGSizeEqualToSize (result, CGSizeZero))
13611370 {
13621371#pragma clang diagnostic push
0 commit comments