@@ -25,6 +25,9 @@ of this software and associated documentation files (the "Software"), to deal
2525
2626#import " WYPopoverController.h"
2727
28+ // TODO: Enable when ios 7 base sdk is enabled
29+ // #define COMPILE_WITH_IOS7_SUPPORT
30+
2831#ifdef DEBUG
2932 #define WY_LOG (fmt, ...) NSLog ((@" %s (%d ) : " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
3033#else
@@ -1316,11 +1319,13 @@ - (CGSize)popoverContentSize
13161319{
13171320 CGSize result = CGSizeZero;
13181321
1322+ #ifdef COMPILE_WITH_IOS7_SUPPORT
13191323 if ([viewController respondsToSelector: @selector (preferredContentSize )])
13201324 {
13211325 result = [viewController preferredContentSize ];
13221326 }
13231327 else
1328+ #endif
13241329 {
13251330#pragma clang diagnostic push
13261331#pragma GCC diagnostic ignored "-Wdeprecated"
@@ -1333,11 +1338,13 @@ - (CGSize)popoverContentSize
13331338
13341339- (void )setPopoverContentSize : (CGSize)size
13351340{
1341+ #ifdef COMPILE_WITH_IOS7_SUPPORT
13361342 if ([viewController respondsToSelector: @selector (setPreferredContentSize: )])
13371343 {
13381344 [viewController setPreferredContentSize: size];
13391345 }
13401346 else
1347+ #endif
13411348 {
13421349#pragma clang diagnostic push
13431350#pragma GCC diagnostic ignored "-Wdeprecated"
@@ -1352,11 +1359,12 @@ - (CGSize)contentSizeForViewInPopover
13521359{
13531360 CGSize result = CGSizeZero;
13541361
1362+ #ifdef COMPILE_WITH_IOS7_SUPPORT
13551363 if ([viewController respondsToSelector: @selector (preferredContentSize )])
13561364 {
13571365 result = viewController.preferredContentSize ;
13581366 }
1359-
1367+ # endif
13601368 if (CGSizeEqualToSize (result, CGSizeZero))
13611369 {
13621370#pragma clang diagnostic push
0 commit comments