Permalink
Browse files

Merge branch 'develop'

  • Loading branch information...
2 parents 36aeb91 + 7831644 commit 003a2ce864c4dc582d9d3016d1e0becf96011063 @Inferis Inferis committed Feb 22, 2013
Showing with 57 additions and 3 deletions.
  1. +1 −1 VERSION
  2. +25 −0 ViewDeck.podspec
  3. +31 −2 ViewDeck/IIViewDeckController.m
View
@@ -1 +1 @@
-2.2.2
+2.2.3
View
@@ -0,0 +1,25 @@
+Pod::Spec.new do |s|
+ s.name = 'ViewDeck'
+ s.version = '2.2.3'
+ s.platform = :ios
+ s.summary = 'An implementation of the sliding functionality found in the ' \
+ 'Path 2.0 or Facebook iOS apps.'
+ s.homepage = 'https://github.com/Inferis/ViewDeck'
+ s.license = {
+ :type => 'MIT',
+ :text => <<-LICENSE
+ Copyright (C) 2011-2013, Tom Adriaenssen
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ LICENSE
+ }
+ s.author = { 'Tom Adriaenssen' => 'http://codedump.blergh.be/' }
+ s.source = { :git => 'https://github.com/Inferis/ViewDeck.git',
+ :tag => '2.2.3'}
+ s.source_files = 'ViewDeck/*.{h,m}'
+ s.frameworks = 'QuartzCore'
+end
@@ -937,6 +937,35 @@ - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInte
[self relayRotationMethod:^(UIViewController *controller) {
[controller willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
}];
+
+ CABasicAnimation* anim = nil;
+ // only animate shadow if we've applied it ourselves.
+ if ([self.delegate respondsToSelector:@selector(viewDeckController:applyShadow:withBounds:)]) {
+ for (NSString* key in self.slidingControllerView.layer.animationKeys) {
+ if ([key isEqualToString:@"bounds"]) {
+ CABasicAnimation* other = (CABasicAnimation*)[self.slidingControllerView.layer animationForKey:key];
+
+ if ([other isKindOfClass:[CABasicAnimation class]]) {
+ anim = [CABasicAnimation animationWithKeyPath:@"shadowPath"];
+ anim.fromValue = (__bridge id)[UIBezierPath bezierPathWithRect:[other.fromValue CGRectValue]].CGPath;
+ anim.duration = other.duration;
+ anim.timingFunction = other.timingFunction;
+ break;
+ }
+ }
+ }
+ }
+
+ // fallback: make shadow transparent and fade in to desired value. This gives the same visual
+ // effect as animating
+ if (!anim) {
+ anim = [CABasicAnimation animationWithKeyPath:@"shadowOpacity"];
+ anim.fromValue = @(0.0);
+ anim.duration = 1;
+ anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
+ }
+ [self.slidingControllerView.layer addAnimation:anim forKey:@"shadowOpacity"];
+
}
@@ -965,7 +994,7 @@ - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceO
}
- (void)arrangeViewsAfterRotation {
- _willAppearShouldArrangeViewsAfterRotation = UIDeviceOrientationUnknown;
+ _willAppearShouldArrangeViewsAfterRotation = (UIInterfaceOrientation)UIDeviceOrientationUnknown;
if (_preRotationSize.width <= 0 || _preRotationSize.height <= 0) return;
CGFloat offset, max, preSize;
@@ -2362,7 +2391,7 @@ - (void)addPanner:(UIView*)view {
if (!view) return;
UIPanGestureRecognizer* panner = II_AUTORELEASE([[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panned:)]);
- panner.cancelsTouchesInView = YES;
+ panner.cancelsTouchesInView = NO;
panner.delegate = self;
[view addGestureRecognizer:panner];
[self.panners addObject:panner];

0 comments on commit 003a2ce

Please sign in to comment.