2012-09-15 29 views
-2

在Appstore屏幕截圖部分,只是想知道當用戶開始水平分頁屏幕截圖時,如何實現Apple自動向屏幕截圖邊緣滾動的方式?App Store屏幕截圖自動滾動效果

他們使用動畫嗎?你會怎麼做?

謝謝!

+0

這是一個非常合理的問題,我知道它可能不適合指導線,但AppStore的是一個把所有iOS開發者會去看看。這將讓他們看到如果他們想知道如何做到這一點。不知道爲什麼這些人認爲投票下來的問題,他們認爲是不合法的會給他們點分數。 – mskw

回答

1

他們可能使用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];