quemb / QMBParallaxScrollViewController

Add a parallax top view to any UIScrollView (incl. UITableViews) - #Parallax #ScrollView #TableView #Header
http://quemb.github.io/QMBParallaxScrollViewController
MIT License
871 stars 121 forks source link

Resize foregroundScrollView frame. #19

Open markst opened 10 years ago

markst commented 10 years ago

When QMBParallaxScrollViewController's view frame changes the subviews do not update accordingly.

One solution is to update the foregroundScrollView's frame upon view frame observer change:

if ([keyPath isEqualToString:@"frame"]) [self.foregroundScrollView setFrame:(CGRect){{0,0},self.view.frame.size}];

or set the _foregroundScrollView's auto resizing mask

_foregroundScrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;