在 Appstore 屏幕截图部分,只是想知道当用户开始水平分页屏幕截图时,Apple 如何实现自动在屏幕截图边缘向下滚动的方式?
他们用动画了吗?你会怎么做?
谢谢!
他们可能使用 UIScrollView 方法:
- (void)scrollRectToVisible:(CGRect)rect animated:(BOOL)animated
或 UIScrollView 方法:
- (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated
当水平滚动视图的委托方法
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
被调用,找出你想要的矩形或点,然后执行:
[theVerticalScrollView scrollRectToVisible:theRectYouWant animated:YES];
或者
[theVerticalScrollView setContentOffset:thePointYouWant animated:YES];