Created
July 29, 2013 08:00
-
-
Save zapsleep/6102766 to your computer and use it in GitHub Desktop.
Init method of DVParallaxView class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (id)initWithFrame:(CGRect)frame | |
{ | |
self = [super initWithFrame:frame]; | |
if (self) { | |
self.parallaxDistanceFactor = 2.f; | |
self.parallaxFrontFactor = 20.f; | |
self.backgroundColor = [UIColor clearColor]; | |
[self addSubview:self.backgroundImageView]; | |
UIPanGestureRecognizer *panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panHandler:)]; | |
[self addGestureRecognizer:panRecognizer]; | |
} | |
return self; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment