I have a scroll view which contains several objects like text fields,labels,switch etc..Now as we are aware that a table view by default provides control for user to scroll and stop where ever he/she wishes to.Like wise I want to achieve the same control for scroll view to stop any where at any point of the view.But my scroll view is not behaving properly,It is not stopping when scrolling is in progress.In other words scroll view is lacking smooth behavior.Instead it is scrolling to the extreme end and showing the 2nd half of view or it is appearing as if it is scrolling and its making the view unchanged i.e. to the start point and showing the view as it is.May be this description might sound a little bit confusing,but in one word I want my scroll view during scrolling,to stop at any object in the view,just as in the case of a table view,so that it is user-friendly.
I have set the frame and content off set to the scroll view in view Will Appear method as follows:
-(void)viewWillAppear:(BOOL)animated
{
scrollView.frame = CGRectMake(0, 0, 320, 460);
[scrollView setContentSize:(CGSizeMake(320, 815))];
}
Note : I have a tab bar controller on the bottom of view,to navigate between controllers.
I have just gone through the UIScrollView as well as delegate class references.I have come across paging,scroll view will begin dragging,scroll to row at index path etc.. methods.Out of these what method I need to implement and what is the logic I need to write.
Want some valuable suggestions.
Thanks all in advance 🙂
OOps….its my mistake 🙁
We need to disable paging enabled property or set to no if it is set to true or yes either in IB or in our code snippet….thanks 🙂