iOS の uiwebview で Facebook コメント ソーシャル プラグインを使用しています。正常に動作しますが、数分間開いた後、アプリ全体のフレームレートが低下します。誰でもこれを経験しますか?誰にもこれに対する解決策がありますか?
新しいプロジェクトを作成してから、Facebook のコメントを含む uiwebview を 1 つだけ追加しようとしました。アプリを数分間開いた後も速度が低下します。
これは Facebook のコメントです https://developers.facebook.com/docs/reference/plugins/comments/
これが私のコードです
commentWebView = [[UIWebView alloc] initWithFrame:(CGRect){15, 50, 500, 376}];
commentWebView.delegate = self;
commentWebView.backgroundColor = [UIColor clearColor];
commentWebView.opaque = NO;
[commentLikeView addSubview:commentWebView];
NSString* html = [NSString stringWithFormat:@"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"><html><head> <meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\"> <title>Facebook Comments Test Page</title> <style type=\"text/css\"> .fb-comments, span, .fb-comments iframe[style] {width: %dpx !important;}</style> </head> <body > <div id=\"fb-root\"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = \"//connect.facebook.net/en_US/all.js#xfbml=1\"; fjs.parentNode.insertBefore(js, fjs); }(document, \"script\", \"facebook-jssdk\"));</script> <fb:comments href=\"%@\" num_posts=\"10\" width=\"470\"></fb:comments> </body> </html>", (int)commentWebView.frame.size.width, link];
//<div class=\"fb-comments\" data-href=\"%@\" data-num-posts=\"10\" ></div>
[commentWebView loadHTMLString:html baseURL:[NSURL URLWithString:@"http://www.facebook.com"]];