Instance Method

scrollRectToVisible:animated:

Scrolls a specific area of the content so that it is visible in the receiver.

Declaration

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

Parameters

rect

A rectangle defining an area of the content view. The rectangle should be in the coordinate space of the scroll view.

animated

YES if the scrolling should be animated, NO if it should be immediate.

Discussion

This method scrolls the content view so that the area defined by rect is just visible inside the scroll view. If the area is already visible, the method does nothing.