Skip to content

Instantly share code, notes, and snippets.

@zapsleep
Created July 29, 2013 08:00
Show Gist options
  • Save zapsleep/6102766 to your computer and use it in GitHub Desktop.
Save zapsleep/6102766 to your computer and use it in GitHub Desktop.
Init method of DVParallaxView class
- (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