전 세계 tabBarController를 내가 작업하고있는 아이폰 앱에 넣었습니다. 그러나 내 화면 중 하나에서 전역 tabBarController와 다른 로컬 tabBar를 넣어야했습니다.글로벌 tabBar에 로컬 tabBar 배치 (글로벌 tabBarController 있음)
두 가지 방법으로 수행했습니다. 1) self.tabBarController.tabBar.hidden = yes;로 전역 tabBar를 숨 깁니다. 보기에 로컬 tabBar를 그 위치에 두는 것입니다. 그러나 tabBar의 프레임이 흰색으로 표시됩니다. 2) 작동하는 전역 tabBar의 하위보기로 로컬 tabBar를 추가하여 시도했지만 화면이 언로드 된 후 [localTabBar removeFromSuperView]를 적용해도 로컬 tabBar가 제거되지 않습니다. 미리
감사 ..
Global tabBarController:
tabBarController = [[UITabBarController alloc] init];
tabBarController.viewControllers = [NSArray arrayWithObjects:ActivityTabnav,nav2,privateChatnav,ExploreTabnav,nav3,tempTabnav, nil];
localtabBar는 뷰의 ViewController의 XIB에 한 tabBar이다. viewDidLoad에있는 > vIewDidUnLoad에
UIWindow* window = [[UIApplication sharedApplication] keyWindow];
[window addSubview:self.tabBar];
는>
[self.tabBar removeFromSuperview];
은 이전 I는 다른 화면에 유지 된 로컬 self.tabBar 하위 뷰로서 self.tabBarController.tabBar에 self.tabBar를 추가하려고 시도.
고맙습니다 ...
나는 그것을 두려워했다. hidesBottomBarWhenPushed 속성을 설정했지만 화면이 언로드 된 후에도 superTab에서 제거되지만 localTabBar는 그대로 유지됩니다. 나는 local tab bar를 전역 tabBar와 tabBarController View의 하위 뷰로 설정했다. – Dinesh
안녕하세요, 고맙습니다. .. viewController 설정의 기능을 초기화 할 때 전역 tabBar의 hidesBottomBarWhenPushed가 트릭을 수행했습니다. – Dinesh