Skip to content

Commit 865044e

Browse files
author
Andrea Bizzotto
committed
Build fixes for iOS 6
1 parent bf6df5d commit 865044e

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

WYPopoverController/WYPopoverController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ typedef NS_OPTIONS(NSUInteger, WYPopoverArrowDirection) {
4646

4747
@interface WYPopoverBackgroundView : UIView
4848

49-
@property (nonatomic, strong) UIColor *strokeColor UI_APPEARANCE_SELECTOR DEPRECATED_MSG_ATTRIBUTE("WYPopoverController [0.1.3] : Use 'outerStrokeColor' instead.");
49+
@property (nonatomic, strong) UIColor *strokeColor UI_APPEARANCE_SELECTOR __attribute((deprecated("WYPopoverController [0.1.3] : Use 'outerStrokeColor' instead.")));
5050

5151
@property (nonatomic, strong) UIColor *tintColor UI_APPEARANCE_SELECTOR;
5252
@property (nonatomic, strong) UIColor *fillTopColor UI_APPEARANCE_SELECTOR;

WYPopoverController/WYPopoverController.m

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)