Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xcode 如何提高UIWebView的滚动速度?_Xcode_Uiwebview_Scroll - Fatal编程技术网

Xcode 如何提高UIWebView的滚动速度?

Xcode 如何提高UIWebView的滚动速度?,xcode,uiwebview,scroll,Xcode,Uiwebview,Scroll,我有一个应用程序在其中一个选项卡上使用UIWebView。 一切都正常工作,但是视图的滚动速度非常慢!不管我是在模拟器中构建它还是在iPhone中构建它,它都是一样的慢滚动。 如何提高视图的滚动速度?我注意到它会在手指离开屏幕后立即停止滚动,而不是像safari中那样继续滚动和减速,这与此有关吗 下面是我的.h文件: // FirstViewController_SE.h // WebApp // // Created by Camilla Fröberg on 2012-03-29. /

我有一个应用程序在其中一个选项卡上使用UIWebView。 一切都正常工作,但是视图的滚动速度非常慢!不管我是在模拟器中构建它还是在iPhone中构建它,它都是一样的慢滚动。 如何提高视图的滚动速度?我注意到它会在手指离开屏幕后立即停止滚动,而不是像safari中那样继续滚动和减速,这与此有关吗

下面是我的.h文件:

//  FirstViewController_SE.h
//  WebApp
//
//  Created by Camilla Fröberg on 2012-03-29.
//  Copyright (c) 2012 SafeLine Sweden AB. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface FirstViewController_SE : UIViewController<UIWebViewDelegate> {

IBOutlet UIWebView *webDisplay_SE;
    UIBarButtonItem* mBack;
    UINavigationItem* back;

}

@property(nonatomic,retain) UIWebView *webDisplay_SE;
@property (nonatomic, retain) IBOutlet UIBarButtonItem* back;

- (void)updateButtons;


@end
试试这个:

webView.scrollView.decelerationRate = UIScrollViewDecelerationRateNormal;

注意:iOS 9中有一个bug,您可能需要解决它

我已经就此提交了一份bug报告。参考号是11322967。两年前,我发布了一个解决方案,但今天有人提到这会导致拒绝。您可以在以下位置看到我的原始响应:完美地作为iOS10.3中WKWebView实例的属性工作
webView.scrollView.decelerationRate = UIScrollViewDecelerationRateNormal;