2015-05-21 2 views
0

В моем приложении у меня есть веб-просмотр и некоторые элементы над веб-просмотром. Когда я просматриваю веб-просмотр, я хочу прокрутить эти элементы. Также я попробовал так много, что это невозможно в scrollViewDidScroll.i что-то else.I попробовал эти коды, но он не работает эффективно ..Webview Scroll Применить self.view IOS

- (void)scrollViewDidScroll:(UIScrollView *)sender { 
CGRect webViewFrame = self.contentWebView.frame; 

webViewFrame.origin.y -= 3; 


CGRect imageViewFrame = self.featuredImageView.frame; 
imageViewFrame.origin.y -= 3; 


CGRect overlayFrame = self.overlayView.frame; 
overlayFrame.origin.y -= 3; 
[UIView animateWithDuration:0.001 animations:^{ 
    self.contentWebView.frame = webViewFrame; 
    self.featuredImageView.frame = imageViewFrame; 
    self.overlayView.frame = overlayFrame; 
}completion:^(BOOL finished) { 
    CGPoint offset2 = sender.contentOffset; 
    offset2.y = 0; 
    sender.contentOffset = offset2; 

}]; 

}

Webview scroll problem

ответ

0

Try добавить подвид (Другие элементы) к вашему webView.scrollView;)

Пример: [myWebView.scrollView addSubView: myItem];