1 つの HTML コード スニペットを使用して TWITTER FEEDS を取得しています。コードは正常に動作していますが、Twitter フィードに移動すると、前のページに戻ることができません。
この html コンテンツを次のようにロードしています。
NSString *twitterFeed = @" <a class=\"twitter-timeline\" href=\"https://twitter.com/search?q=%23diabetes+OR+%23bloodglucose+OR+%23insulin+OR+%23insulinpump+OR+%23type2+OR+%23type1\" data-widget-id=\"386089263655178240\">Tweets about \"#diabetes OR #bloodglucose OR #insulin OR #insulinpump OR #type2 OR #type1\"</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+\"://platform.twitter.com/widgets.js\";fjs.parentNode.insertBefore(js,fjs);}}(document,\"script\",\"twitter-wjs\");</script>";
if (appDelegate.isReachable)
{
[self.webView loadHTMLString:twitterFeed baseURL:nil];
}
else
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Alert" message:@"No internet connection !!" delegate:nil cancelButtonTitle:@"Cancel" otherButtonTitles:nil, nil];
[alert show];
}
また、次のコードを使用してwebviewに戻ります
if ([self.webView canGoBack])
{
NSLog(@"Can go BACK");
[self.webView goBack];
}
それでも戻れません。これを行う方法を教えてください。