Skip to content

Commit e4d2682

Browse files
author
Mads Møller
committed
v.1.3.2 - Downgrade - less buggy version. Thanks @mantonaci
2 parents ac5aeae + 53e45b3 commit e4d2682

9 files changed

Lines changed: 161 additions & 563 deletions

Classes/ViewDeck/IISideController.h

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,9 @@
11
//
22
// IISideController.h
3-
// IIViewDeck
3+
// Drache
44
//
5-
// Copyright (C) 2011-2013, Tom Adriaenssen
6-
//
7-
// Permission is hereby granted, free of charge, to any person obtaining a copy of
8-
// this software and associated documentation files (the "Software"), to deal in
9-
// the Software without restriction, including without limitation the rights to
10-
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
11-
// of the Software, and to permit persons to whom the Software is furnished to do
12-
// so, subject to the following conditions:
13-
//
14-
// The above copyright notice and this permission notice shall be included in all
15-
// copies or substantial portions of the Software.
16-
//
17-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23-
// SOFTWARE.
5+
// Created by Tom Adriaenssen on 05/12/12.
6+
// Copyright (c) 2012 Tom Adriaenssen. All rights reserved.
247
//
258

269
#import "IIWrapController.h"
@@ -29,9 +12,6 @@
2912

3013
@property (nonatomic, assign) CGFloat constrainedSize;
3114

32-
+ (IISideController*)autoConstrainedSideControllerWithViewController:(UIViewController*)controller;
33-
+ (IISideController*)sideControllerWithViewController:(UIViewController*)controller constrained:(CGFloat)constrainedSize;
34-
3515
- (id)initWithViewController:(UIViewController*)controller constrained:(CGFloat)constrainedSize;
3616

3717
- (void)shrinkSide;

Classes/ViewDeck/IISideController.m

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,10 @@
11
//
22
// IISideController.m
3-
// IIViewDeck
3+
// Drache
44
//
5-
// Copyright (C) 2011-2013, Tom Adriaenssen
5+
// Created by Tom Adriaenssen on 05/12/12.
6+
// Copyright (c) 2012 Tom Adriaenssen. All rights reserved.
67
//
7-
// Permission is hereby granted, free of charge, to any person obtaining a copy of
8-
// this software and associated documentation files (the "Software"), to deal in
9-
// the Software without restriction, including without limitation the rights to
10-
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
11-
// of the Software, and to permit persons to whom the Software is furnished to do
12-
// so, subject to the following conditions:
13-
//
14-
// The above copyright notice and this permission notice shall be included in all
15-
// copies or substantial portions of the Software.
16-
//
17-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23-
// SOFTWARE.
24-
//
25-
268

279
#import "IISideController.h"
2810
#import "IIViewDeckController.h"
@@ -39,14 +21,6 @@ @interface IISideController ()
3921

4022
@implementation IISideController
4123

42-
+ (IISideController*)autoConstrainedSideControllerWithViewController:(UIViewController*)controller {
43-
return [[IISideController alloc] initWithViewController:controller];
44-
}
45-
46-
+ (IISideController*)sideControllerWithViewController:(UIViewController*)controller constrained:(CGFloat)constrainedSize {
47-
return [[IISideController alloc] initWithViewController:controller constrained:constrainedSize];
48-
}
49-
5024
- (id)initWithViewController:(UIViewController*)controller constrained:(CGFloat)constrainedSize {
5125
if ((self = [super initWithViewController:controller])) {
5226
_constrainedSize = constrainedSize;

Classes/ViewDeck/IIViewDeckController.h

Lines changed: 17 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// IIViewDeckController.h
33
// IIViewDeck
44
//
5-
// Copyright (C) 2011-2013, Tom Adriaenssen
5+
// Copyright (C) 2011, Tom Adriaenssen
66
//
77
// Permission is hereby granted, free of charge, to any person obtaining a copy of
88
// this software and associated documentation files (the "Software"), to deal in
@@ -27,43 +27,25 @@
2727

2828
// thanks to http://stackoverflow.com/a/8594878/742176
2929

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
4334
#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
6536
#endif
6637

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
6749

6850

6951
@protocol IIViewDeckControllerDelegate;
@@ -145,9 +127,7 @@ extern IIViewDeckOffsetOrientation IIViewDeckOffsetOrientationFromIIViewDeckSide
145127
CGPoint _willAppearOffset;
146128
NSMutableArray* _finishTransitionBlocks;
147129
int _disabledUserInteractions;
148-
CALayer* _shadowLayer;
149130
BOOL _needsAddPannersIfAllPannersAreInactive;
150-
NSMutableSet* _disabledPanClasses;
151131
}
152132

153133
typedef void (^IIViewDeckControllerBlock) (IIViewDeckController *controller, BOOL success);
@@ -182,9 +162,6 @@ typedef void (^IIViewDeckControllerBounceBlock) (IIViewDeckController *controlle
182162
@property (nonatomic, assign, readonly) CGFloat bottomViewSize;
183163
@property (nonatomic, assign, readonly) CGFloat bottomLedgeSize;
184164
@property (nonatomic, assign) CGFloat maxSize;
185-
@property (nonatomic, assign) CGFloat centerViewOpacity;
186-
@property (nonatomic, assign) CGFloat centerViewCornerRadius;
187-
@property (nonatomic, assign) BOOL shadowEnabled;
188165
@property (nonatomic, assign) BOOL resizesCenterView;
189166
@property (nonatomic, assign) IIViewDeckPanningMode panningMode;
190167
@property (nonatomic, assign) BOOL panningCancelsTouchesInView;
@@ -303,11 +280,6 @@ typedef void (^IIViewDeckControllerBounceBlock) (IIViewDeckController *controlle
303280

304281
- (IIViewDeckSide)sideForController:(UIViewController*)controller;
305282

306-
- (void)disablePanOverViewsOfClass:(Class)viewClass;
307-
- (void)enablePanOverViewsOfClass:(Class)viewClass;
308-
- (BOOL)canPanOverViewsOfClass:(Class)viewClass;
309-
- (NSArray*)viewClassesWithDisabledPan;
310-
311283
@end
312284

313285

@@ -338,8 +310,6 @@ typedef void (^IIViewDeckControllerBounceBlock) (IIViewDeckController *controlle
338310

339311
- (CGFloat)viewDeckController:(IIViewDeckController*)viewDeckController changesLedge:(CGFloat)ledge forSide:(IIViewDeckSide)viewDeckSide;
340312

341-
- (BOOL)viewDeckController:(IIViewDeckController*)viewDeckController shouldBeginPanOverView:(UIView*)view;
342-
343313
@end
344314

345315

0 commit comments

Comments
 (0)