I am using xCode 4.5.2, I added a UIScrollView and I checked Bounce Horizontally in IB and setAlwaysBounceHorizontal in viewDidAppear to YES and it works fine, but apparently the UIScrollView has been resized when I load another view and return to it, although the viewDidAppear has setContentSize:
-(void) viewDidAppear:(BOOL)animated{
[scroller setContentSize:CGSizeMake(2000, 90)];
[scroller setAlwaysBounceHorizontal:YES];
[scroller setAutoresizesSubviews:NO];
scroller.showsHorizontalScrollIndicator = NO;
scroller.showsVerticalScrollIndicator = NO;
[scroller setUserInteractionEnabled:YES];
[scroller setScrollEnabled:YES];
[scroller setPagingEnabled:YES];
}
Hope to find a solution for this ..
Thanks everyone 🙂
SOLVED:
If you created a
scrollViewfrom nib you have to uncheck the Use Autolayout from there: