Search code examples
iphonexcode4uiscrollview

UIScrollView Not Scrolling Properly after add other controls


I am Creating a Tabbar Application, In 3rd Tabbar i have some products showing in CollectionView, where user will select one product it will take user to a Form. until here it working perfect.Because my form fields are many so i decide to use UIScrollView control to show all fields filled by the user. When I add any control like UIImageView or Label or Button the ScrollView is not scrolling. I need the size [scroller setContentSize:CGSizeMake(320, 1100)]; , Without any control the ScrollView scrolling fully without any problem. After Adding any control the ScrollView not scrolling properly. what i have to do so the scrollView will scroll fully after i add any control. Am using Storyboard and UINavigationController for navigation.

[scroller setScrollEnabled:YES];
[scroller setContentSize:CGSizeMake(320, 1100)];
[scroller setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"OrderBackround.png"]]];

Solution

  • Try setting UISCrollView's property setDelaysContentTouches to YES. More explanation you will find here