我正在使用一个 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];
}
我仍然无法回去。请帮我怎么做?