2014-01-06 3 views
0

-hidesBottomBarWhenPushed 속성을 사용할 때 이상한보기 컨트롤러 문제가 있습니다. 이것은 iOS 7 전용 프로젝트입니다. Xcode 5.를 사용하여 최신입니다. 베타 없음.-hidesBottomBarWhen Nav 컨트롤러에서 사용할 때 문제가 발생했습니다.

몇 가지 문제가 있지만 모두 동일한 문제를 해결하고 있다고 생각합니다. 다음은 다른 사용 사례입니다.

두 사례 모두 동일한 레이아웃으로 시작됩니다. UITabBarController (2 탭) -> UINavigationController (Tab1) -> Tab2 (예를 들어 필요 없음) -> 내 응용 프로그램 창에서 rootViewController로 설정.

사용 사례 1 :

ViewController1 - Has navigation controller and tableview with content. Push a view controller that does not need the tab bar (uses toolbar with custom content). 
ViewController2 - Tab bar is not showing, things look great so far. Now I need to push another view controller that needs the tab bar again. 
ViewController3 - Tab bar is showing, things are still good to go. One more level to go, tab bar still needs to show. 
ViewController4 - Tab bar is missing. Not good. This sucks, lets back up. 
ViewController3 - Tab bar is now gone here too. View takes up full space, that is good, but no tab bar. Back we go. 
ViewController2 - What the eff? My toolbar is shaded and can't be selected, and the view is sized like there is a tab bar there. I can scroll content and see where it thinks the view ends. This view is toast, back to home. 
ViewController1 - Everything is back to normal. Tab bar showing no problem. I can drill back in with no issues going in, but coming back, everything is hosed pretty bad. 

사용 사례 2 :

우리는보기를 생략하고 비슷한 결과를 얻을 수 있습니다.

ViewController1 - Same as Use Case 1. Our home view, where everything is working and looks great. 
ViewController3 - Lets skip the toolbar view and keep our tab bar in place. No sweat. Tab bar shows up fine. Looks good, lets drill in one more level. 
ViewController4 - The hell? Tab bar is here, but it looks shaded or selected. Content is offset up from the tab bar, it doesn't line up with the tab bar. About the same height as the tab bar. If we toggle tabs, the tab bar loses its shaded state. Come back to same screwed up view... looks fine now. The table view here is now nested perfectly on top of the tab bar. I give up!! 
ViewController3 - The tab bar here looks fine at least. Whew! One less thing to fix. 
ViewController1 - Home still looks good. Please don't ever leave me home view. 

이것은 내가 취한 조치입니다. 이제 내가 어떻게 이러한 견해를 추진하고 있는지.

ViewController1 - 대부분의 힘든 일을합니다. 다른 질문의 예제 및 수정으로 인해보기를 문 밖으로 밀어 내기 전에 -hidesBottomBarWhenPushed 속성을 설정하는 것입니다.

모든보기 컨트롤러에는 init, self.hidesTabBar 중에 설정된 속성이 있습니다. YES는 그것을 숨기고 NO는 그것을 보여줍니다.

ViewController2 alloc/init; // normal init stuffs 
// set current view property to the property on next views property (set in init of view) 
[self setHidesBottomBarWhenPushed:ViewController2.hidesTabBar]; 
[self.navigationController pushViewController:ViewController2 animated:YES]; 
// set back after pushing to what the current view needs to be at 
[self setHidesBottomBarWhenPushed:self.hidesTabBar]; 

이 방법은 모든보기가 탐색 스택에 푸시 될 때까지 계속됩니다. 기본적으로 내가 푸시하기 전에 현재 뷰 -hidesBottomBarWhenPushed 속성을 내가 푸시 할 뷰와 동일하게 설정합니다. 내가 밀고 난 후에, 나는 그것을 밀기 전에 그것이 있던 곳으로 되돌려 놓았다.

나는 이것을 설정하는 모든 조합을 시도해 보았고, 나는 모든 문제를 끝내게된다. 탭 막대가 표시 될 때를 제어 할 수 있어야합니다. 어떤 경우에는 항상 위로있을 것입니다. 일부는 표시/숨기기/표시/표시 및 그 사이의 모든 조합을 표시합니다. 유일한 상수는 항법 스택의 루트/첫 번째 뷰에 항상 표시된다는 것입니다. 그 후에는 모두 사용자가 사용하는 경로에 따라 다릅니다. 도움!!!

답변

0

레이더를 제출 한 후, Apple이 iOS 7의 버그라고 인정한 것으로 보입니다. iOS 7.1b4에서 수정 된 것으로보고되었습니다. 나는 또한이 빌드에서 고정되어 있는지 확인했습니다.

관련 문제