Skip to content

Commit

Permalink
[GI#2] Enable scrollsToTop.
Browse files Browse the repository at this point in the history
  • Loading branch information
modocache committed Feb 3, 2013
1 parent e57ecf7 commit cc2172b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions MDCParallaxView.m
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ - (id)initWithBackgroundView:(UIView *)backgroundView foregroundView:(UIView *)f
_backgroundScrollView.backgroundColor = [UIColor clearColor];
_backgroundScrollView.showsHorizontalScrollIndicator = NO;
_backgroundScrollView.showsVerticalScrollIndicator = NO;
_backgroundScrollView.scrollsToTop = NO;
[_backgroundScrollView addSubview:_backgroundView];
[self addSubview:_backgroundScrollView];

Expand Down
2 changes: 2 additions & 0 deletions SampleApp/Controllers/ImageViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,15 @@ - (void)viewDidLoad {
textView.textAlignment = NSTextAlignmentCenter;
textView.font = [UIFont systemFontOfSize:14.0f];
textView.textColor = [UIColor darkTextColor];
textView.scrollsToTop = NO;
textView.editable = NO;

MDCParallaxView *parallaxView = [[MDCParallaxView alloc] initWithBackgroundView:backgroundImageView
foregroundView:textView];
parallaxView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
parallaxView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
parallaxView.backgroundHeight = 250.0f;
parallaxView.scrollView.scrollsToTop = YES;
parallaxView.scrollViewDelegate = self;
[self.view addSubview:parallaxView];
}
Expand Down

0 comments on commit cc2172b

Please sign in to comment.