2012-01-02 1 views
0

4 개의 항목이있는 탭 막대 컨트롤러가 있습니다. 4에서 하나의 링크가있는 webView가 포함되었습니다. 링크 중 하나는 PDF이며, webView에서 PDF를 열면 링크가있는 기본 webView로 돌아갈 방법이 없습니다. 4. TabBar를 다시 클릭하여보기를 다시로드하는 방법이 있습니까? 3.에서 4. tabbar로 변경하면 작동합니다 (viewWillAppear). ! [이미지 설명은 여기에 입력하십시오] [1]Reload View by TabBarItem (PDF의 원인)

미리 도움을 주셔서 감사합니다.

- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item; 

당신은 또한 선택 탭 표시 줄 항목의 접촉을 잡기 위해 그것을 사용할 수 있습니다

답변

0

의이 방법으로 (UITabBarControllerDelegate)를보십시오 :

(이 같은 아마 뭔가)

- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController{ 
     //Try this if you're pushing the webView in another ViewController 
     [viewController.navigationController popToRootViewControllerAnimated:YES]; 
     //or access to your webView and call goBack(); 
} 
0

라는 UITabBarDelegate의 방법이있다.