0

Would it be possible to have a splitview controller that controls the offset of a UIScrollView which is in the detail view.

Basically I have one long image inside a scroll frame in the detail view and I want to be able to jump to parts of the image by using the MastwerViewController table as a "navigation" bar.

Any help would be appreciated.

Thanks, Alex

4

2 回答 2

0

看起来您正在寻找以编程方式设置滚动视图的内容偏移量。

[scrollView setContentOffset:CGPointMake(newOffset, 0) animated:YES];
于 2012-08-06T11:16:52.833 回答
0

首先,您必须根据单击主视图时要显示的部分来找到滚动视图的偏移值,然后将这些偏移值绑定到此方法

-(void) MoveScrollView:CGPointMake(CGFloat X, CGFloat Y)
{
     [scrollView setContentOffset:CGPointMake(CGFloat X, CGFloat Y) animated:YES];
}
于 2012-08-06T11:37:21.623 回答