Permalink
Browse files

removed animation delegate property in GenericAnimationView/FlipView …

…- we don't need to assign a delegate to the CALayers
  • Loading branch information...
1 parent 8681006 commit c1ec28d57bb60cf7b4ecfa75d0b7588b76fbfb9c @Dillion committed Mar 13, 2012
@@ -97,7 +97,6 @@ - (void)viewDidLoad
animationDelegate.perspectiveDepth = 200;
self.flipView = [[FlipView alloc] initWithAnimationType:kAnimationFlipVertical
- animationDelegate:animationDelegate
frame:CGRectMake(60, 95, 200, 50)];
animationDelegate.transformView = flipView;
@@ -167,7 +166,6 @@ - (void)viewDidLoad
animationDelegate2.perspectiveDepth = 2000;
self.flipView2 = [[FlipView alloc] initWithAnimationType:kAnimationFlipHorizontal
- animationDelegate:animationDelegate2
frame:CGRectMake(60, 240, 200, 110)];
animationDelegate2.transformView = flipView2;
@@ -3,9 +3,7 @@
File: AnimationDelegate.h
Abstract: Animation Delegate is the helper to handle callbacks
- from transform operations. The delegate has to be outside the
- view hierarchy because a UIView can have only 1 delegating
- CALayer, which is the one created by default. The animation
+ from transform operations. The animation
delegate should have knowledge of how and what kind of transform
should be applied to current animation frame, based on the type
of animation and various user settings.
@@ -3,9 +3,7 @@
File: AnimationDelegate.m
Abstract: Animation Delegate is the helper to handle callbacks
- from transform operations. The delegate has to be outside the
- view hierarchy because a UIView can have only 1 delegating
- CALayer, which is the one created by default. The animation
+ from transform operations. The animation
delegate should have knowledge of how and what kind of transform
should be applied to current animation frame, based on the type
of animation and various user settings.
@@ -40,12 +40,10 @@ @implementation FlipView
@synthesize sublayerCornerRadius;
- (id)initWithAnimationType:(AnimationType)aType
- animationDelegate:(AnimationDelegate *)aDelegate
frame:(CGRect)aFrame
{
if ((self = [super initWithAnimationType:aType
- animationDelegate:aDelegate
frame:aFrame])) {
sublayerCornerRadius = 0.0f;
@@ -156,9 +154,6 @@ - (BOOL)printText:(NSString *)tickerString
[self.imageStackArray addObject:newFrame];
- [flipLayer setDelegate:self.animationDelegate];
- [flipLayer2 setDelegate:self.animationDelegate];
-
return YES;
}
break;
@@ -234,9 +229,6 @@ - (BOOL)printText:(NSString *)tickerString
[self.imageStackArray addObject:newFrame];
- [flipLayer setDelegate:self.animationDelegate];
- [flipLayer2 setDelegate:self.animationDelegate];
-
return YES;
}
break;
@@ -58,8 +58,6 @@
// Image data is grouped into Animation Frames, each frame contains the set of images displayed in between sequences
@property (nonatomic, retain) NSMutableArray *imageStackArray;
-@property (nonatomic, assign) AnimationDelegate *animationDelegate;
-
// set inset to restrict text frame size
@property (nonatomic) CGPoint textInset;
// set offset from position to align text
@@ -78,7 +76,6 @@
@property (nonatomic) AnimationType animationType;
- (id)initWithAnimationType:(AnimationType)aType
- animationDelegate:(AnimationDelegate *)aDelegate
frame:(CGRect)aFrame;
// method to override for subclasses
@@ -41,7 +41,6 @@
@implementation GenericAnimationView
@synthesize imageStackArray;
-@synthesize animationDelegate;
@synthesize textInset;
@synthesize textOffset;
@synthesize fontSize;
@@ -51,7 +50,6 @@ @implementation GenericAnimationView
@synthesize animationType;
- (id)initWithAnimationType:(AnimationType)aType
- animationDelegate:(AnimationDelegate *)aDelegate
frame:(CGRect)aFrame
{
self = [super init];
@@ -65,8 +63,6 @@ - (id)initWithAnimationType:(AnimationType)aType
self.imageStackArray = [NSMutableArray array];
- animationDelegate = aDelegate;
-
templateWidth = aFrame.size.width;
templateHeight = aFrame.size.height;
self.frame = aFrame;

3 comments on commit c1ec28d

@ootake
ootake commented on c1ec28d Apr 20, 2012

Please add semantic version tags.

Issue description
I’ve recently added iOS-Flip-Transform to the CocoaPods package manager repo.

CocoaPods is a tool for managing dependencies for OSX and iOS Xcode projects and provides a central repository for iOS/OSX libraries. This makes adding libraries to a project and updating them extremely easy and it will help users to resolve dependencies of the libraries they use.

However, iOS-Flip-Transform doesn't have any version tags. I’ve added the current HEAD as version 0.0.1, but a version tag will make dependency resolution much easier.

Semantic version tags (instead of plain commit hashes/revisions) allow for resolution of cross-dependencies.

In case you didn’t know this yet; you can tag the current HEAD as, for instance, version 1.0.0, like so:

$ git tag -a 1.0.0 -m "Tag release 1.0.0"
$ git push --tags

@ARFAOUI
ARFAOUI commented on c1ec28d Jul 2, 2012

did any one one how can i detect touch on every image on the Flipview ?

@Dillion
Owner

@ootake updated tag, thanks!

Please sign in to comment.