diff --git a/APParallaxHeader/UIScrollView+APParallaxHeader.h b/APParallaxHeader/UIScrollView+APParallaxHeader.h index d379dce..e96365e 100755 --- a/APParallaxHeader/UIScrollView+APParallaxHeader.h +++ b/APParallaxHeader/UIScrollView+APParallaxHeader.h @@ -17,6 +17,7 @@ - (void)addParallaxWithImage:(UIImage *)image andHeight:(CGFloat)height andShadow:(BOOL)shadow; - (void)addParallaxWithImage:(UIImage *)image andHeight:(CGFloat)height; - (void)addParallaxWithView:(UIView*)view andHeight:(CGFloat)height; +- (void)addParallaxWithView:(UIView*)view andHeight:(CGFloat)height andShadow:(BOOL)shadow; @property (nonatomic, strong, readonly) APParallaxView *parallaxView; @property (nonatomic, assign) BOOL showsParallax; diff --git a/APParallaxHeader/UIScrollView+APParallaxHeader.m b/APParallaxHeader/UIScrollView+APParallaxHeader.m index 57e63e1..012a2df 100755 --- a/APParallaxHeader/UIScrollView+APParallaxHeader.m +++ b/APParallaxHeader/UIScrollView+APParallaxHeader.m @@ -63,6 +63,10 @@ - (void)addParallaxWithImage:(UIImage *)image andHeight:(CGFloat)height andShado } - (void)addParallaxWithView:(UIView*)view andHeight:(CGFloat)height { + [self addParallaxWithView:view andHeight:height andShadow:YES]; +} + +- (void)addParallaxWithView:(UIView*)view andHeight:(CGFloat)height andShadow:(BOOL)shadow { if(self.parallaxView) { [self.parallaxView.currentSubView removeFromSuperview]; [view setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight]; @@ -70,7 +74,7 @@ - (void)addParallaxWithView:(UIView*)view andHeight:(CGFloat)height { } else { - APParallaxView *parallaxView = [[APParallaxView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, height)]; + APParallaxView *parallaxView = [[APParallaxView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, height) andShadow:shadow]; [parallaxView setClipsToBounds:YES]; [parallaxView setCustomView:view]; diff --git a/Demo/APParallaxHeaderDemo/MasterViewController.m b/Demo/APParallaxHeaderDemo/MasterViewController.m index bd3914b..981c109 100644 --- a/Demo/APParallaxHeaderDemo/MasterViewController.m +++ b/Demo/APParallaxHeaderDemo/MasterViewController.m @@ -74,7 +74,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath]; - cell.textLabel.text = [NSString stringWithFormat:@"Row %i", indexPath.row+1]; + cell.textLabel.text = [NSString stringWithFormat:@"Row %li", indexPath.row+1]; return cell; }