webView加載H5界面中,H5中鏈接跳轉(zhuǎn)到H5網(wǎng)頁卓嫂,H5中無返回按鈕榔昔,點(diǎn)擊leftBarButton會(huì)直接跳出當(dāng)前界面而不是返回到上一級(jí)的H5頁,解決這個(gè)問題可以用下面代碼
- (void)leftBarBtnClicked {
if ([self.webView canGoBack]) {
[self.webView goBack];
} else {
[self.view resignFirstResponder];
[self.navigationController popViewControllerAnimated:YES];
}
}