Все это, скорее всего, UIScrollView
(UITableView
также являются видами прокрутки). Когда кнопки нажаты, используйте setContentOffset:animated:
или scrollRectToVisible:animated:
, чтобы выполнить прокрутку. «Волшебство» заключается только в расчете правильного смещения или прямоугольника. Я бы предложил пойти с setContentOffset:animated:
. Это должно работать примерно так:
CGPoint p;
p.x = 0;
// Get middle of the view to be centered.
p.y = CGRectGetMidY(myViewThatShouldBeCentered.frame);
// Need to offset it by half the scroll view frame, otherwise
// you'd just see the lower half of the view peeking out at the
// top of the scroll view.
p.y -= CGRectGetHeight(myScrollView.frame) / 2;
[myScrollView setContentOffset:p animated:YES];