|
2 | 2 | // IIViewDeckController.h |
3 | 3 | // IIViewDeck |
4 | 4 | // |
5 | | -// Copyright (C) 2011-2013, Tom Adriaenssen |
| 5 | +// Copyright (C) 2011, Tom Adriaenssen |
6 | 6 | // |
7 | 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy of |
8 | 8 | // this software and associated documentation files (the "Software"), to deal in |
|
27 | 27 |
|
28 | 28 | // thanks to http://stackoverflow.com/a/8594878/742176 |
29 | 29 |
|
30 | | -#ifdef __has_feature |
31 | | - |
32 | | - #if __has_feature(objc_arc_weak) |
33 | | - #define __ii_weak __weak |
34 | | - #define ii_weak_property weak |
35 | | - #elif __has_feature(objc_arc) |
36 | | - #define ii_weak_property unsafe_unretained |
37 | | - #define __ii_weak __unsafe_unretained |
38 | | - #else |
39 | | - #define ii_weak_property assign |
40 | | - #define __ii_weak |
41 | | - #endif |
42 | | - |
| 30 | +#if TARGET_OS_IPHONE && defined(__IPHONE_5_0) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0) && __clang__ && (__clang_major__ >= 3) |
| 31 | +#define II_SDK_SUPPORTS_WEAK 1 |
| 32 | +#elif TARGET_OS_MAC && defined(__MAC_10_7) && (MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_7) && __clang__ && (__clang_major__ >= 3) |
| 33 | +#define II_SDK_SUPPORTS_WEAK 1 |
43 | 34 | #else |
44 | | - |
45 | | - #if TARGET_OS_IPHONE && defined(__IPHONE_5_0) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0) && __clang__ && (__clang_major__ >= 3) |
46 | | - #define II_SDK_SUPPORTS_WEAK 1 |
47 | | - #elif TARGET_OS_MAC && defined(__MAC_10_7) && (MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_7) && __clang__ && (__clang_major__ >= 3) |
48 | | - #define II_SDK_SUPPORTS_WEAK 1 |
49 | | - #else |
50 | | - #define II_SDK_SUPPORTS_WEAK 0 |
51 | | - #endif |
52 | | - |
53 | | - #if II_SDK_SUPPORTS_WEAK |
54 | | - #define __ii_weak __weak |
55 | | - #define ii_weak_property weak |
56 | | - #else |
57 | | - #if __clang__ && (__clang_major__ >= 3) |
58 | | - #define __ii_weak __unsafe_unretained |
59 | | - #else |
60 | | - #define __ii_weak |
61 | | - #endif |
62 | | - #define ii_weak_property assign |
63 | | - #endif |
64 | | - |
| 35 | +#define II_SDK_SUPPORTS_WEAK 0 |
65 | 36 | #endif |
66 | 37 |
|
| 38 | +#if II_SDK_SUPPORTS_WEAK |
| 39 | +#define __ii_weak __weak |
| 40 | +#define ii_weak_property weak |
| 41 | +#else |
| 42 | +#if __clang__ && (__clang_major__ >= 3) |
| 43 | +#define __ii_weak __unsafe_unretained |
| 44 | +#else |
| 45 | +#define __ii_weak |
| 46 | +#endif |
| 47 | +#define ii_weak_property assign |
| 48 | +#endif |
67 | 49 |
|
68 | 50 |
|
69 | 51 | @protocol IIViewDeckControllerDelegate; |
@@ -145,9 +127,7 @@ extern IIViewDeckOffsetOrientation IIViewDeckOffsetOrientationFromIIViewDeckSide |
145 | 127 | CGPoint _willAppearOffset; |
146 | 128 | NSMutableArray* _finishTransitionBlocks; |
147 | 129 | int _disabledUserInteractions; |
148 | | - CALayer* _shadowLayer; |
149 | 130 | BOOL _needsAddPannersIfAllPannersAreInactive; |
150 | | - NSMutableSet* _disabledPanClasses; |
151 | 131 | } |
152 | 132 |
|
153 | 133 | typedef void (^IIViewDeckControllerBlock) (IIViewDeckController *controller, BOOL success); |
@@ -182,9 +162,6 @@ typedef void (^IIViewDeckControllerBounceBlock) (IIViewDeckController *controlle |
182 | 162 | @property (nonatomic, assign, readonly) CGFloat bottomViewSize; |
183 | 163 | @property (nonatomic, assign, readonly) CGFloat bottomLedgeSize; |
184 | 164 | @property (nonatomic, assign) CGFloat maxSize; |
185 | | -@property (nonatomic, assign) CGFloat centerViewOpacity; |
186 | | -@property (nonatomic, assign) CGFloat centerViewCornerRadius; |
187 | | -@property (nonatomic, assign) BOOL shadowEnabled; |
188 | 165 | @property (nonatomic, assign) BOOL resizesCenterView; |
189 | 166 | @property (nonatomic, assign) IIViewDeckPanningMode panningMode; |
190 | 167 | @property (nonatomic, assign) BOOL panningCancelsTouchesInView; |
@@ -303,11 +280,6 @@ typedef void (^IIViewDeckControllerBounceBlock) (IIViewDeckController *controlle |
303 | 280 |
|
304 | 281 | - (IIViewDeckSide)sideForController:(UIViewController*)controller; |
305 | 282 |
|
306 | | -- (void)disablePanOverViewsOfClass:(Class)viewClass; |
307 | | -- (void)enablePanOverViewsOfClass:(Class)viewClass; |
308 | | -- (BOOL)canPanOverViewsOfClass:(Class)viewClass; |
309 | | -- (NSArray*)viewClassesWithDisabledPan; |
310 | | - |
311 | 283 | @end |
312 | 284 |
|
313 | 285 |
|
@@ -338,8 +310,6 @@ typedef void (^IIViewDeckControllerBounceBlock) (IIViewDeckController *controlle |
338 | 310 |
|
339 | 311 | - (CGFloat)viewDeckController:(IIViewDeckController*)viewDeckController changesLedge:(CGFloat)ledge forSide:(IIViewDeckSide)viewDeckSide; |
340 | 312 |
|
341 | | -- (BOOL)viewDeckController:(IIViewDeckController*)viewDeckController shouldBeginPanOverView:(UIView*)view; |
342 | | - |
343 | 313 | @end |
344 | 314 |
|
345 | 315 |
|
|
0 commit comments