English 中文(简体)
View from the second tab in the background at transition between two views at the first tab (and not a color as is should)
原标题:

I have an tabbar-application with four tabs. Every tab loades an nib with its viewcontroller. In my first nib i have two views. In the first view (placeholder) is a button to switch to the second view (view1) and reverse (With an Boolean to see if the second view is on top or not).

-(IBAction)transitionFlip {
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:1.5];  
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.view cache:YES];
    if (view1OnTop) {
        [view1 removeFromSuperview];
        view1OnTop = NO;
    }
    else {
        [placeholder addSubview:view1];
        view1OnTop = YES;
    }
    [UIView commitAnimations];
}

The Problem: When i click on the button it works fine. But the Second-Tabbar Nib is on the animation-background? When i click on the Second-Tabbar and go back to the first, then the animation-background is white (as it should).

In the Main Appdelegate i have only added two Controllers:

[window addSubview:navigationController.view];
[window addSubview:tabBarController.view];
[window makeKeyAndVisible];

Any ideas?

最佳回答

The problem is likely caused by adding both navigationController.view and tabBarController.view as subviews of UIWindow. Instead of this view hierarchy:

UIWindow -> [UITabBarController -> [view, view, ...], UINavigationController -> view]

try adding only tabBarController s view to the window, and letting it manage separate UINavigationControllers for each tab:

UIWindow -> UITabBarController -> [UINavigationController -> view, UINavigationController -> view, ...]

问题回答

暂无回答




相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签