UIView with an Image as a Subview breaks Parallax
Closed this issue · 2 comments
Sun3 commented
I am using below code to add a UIView with an UIImageView inside, next I would like to add a scrollview instead. But when you add the Image as the subView of UIView the Parallax does not work.
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 160)];
[view setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight];
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"ParallaxImage"]];
[imageView setFrame:CGRectMake(0, 0, self.view.frame.size.width, 160)];
[imageView setContentMode:UIViewContentModeScaleAspectFill];
[imageView setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight];
[view addSubview:imageView];
[self.tableView addParallaxWithView:view andHeight:160];
Any ideas?
Thanks for a great control.
RishabhTayal commented
@Sun3 Where do you get this method from? The current version of library doesn't have this method.