How to scroll horizontally ScrollView by clicking the button on iPhone SDK

advertisements

I am making an iPhone app which has a scrollview.

I have a button on left and right side of the scrollview.

On click of these two buttons the scrollview should scroll in the respective horizontal direction.

What should I do to scroll the scroll view on the click of these buttons?

Please Help and Suggest.

Thanks.


- (void)scrollRectToVisible:(CGRect)rect  animated:(BOOL)animated