私のiPhoneアプリを普遍的にしようとしています。ナビゲーションコントローラは不均衡な通話を続けます

私のiPhoneアプリを普遍的にするために今、何時間も試してきました。ミッションは成功しましたが、奇妙な問題があります。ナビゲーションコントローラは何も押さずに物事を押し続ける。アプリはクラッシュしませんが、コンソールにメッセージが表示されます

nested push animation can result in corrupted navigation bar 2012-02-06 10:52:07.701 @#$%^^$[54755:207] Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted. 2012-02-06 10:52:07.704 [email protected]#$%^$%#[54755:207] Unbalanced calls to begin/end appearance transitions for .

ここで私はすべてのアプリを設定している方法です:

![ナビゲーションスクリーンショット] [1]

ここで私のコードは、AppDelegate_iphone.hです。

#import 
#import "iPhoneView.h"
#import "AboutUsViewController.h"
#import "FavoritesViewController.h"

@class iPhoneView;

@interface AppDelegate_iPhone : NSObject  {

    UITabBarController *tabBarController;
    UINavigationController *homeNavigationController;
    UINavigationController *favouritesNavigationController;
    AboutUsViewController *aboutUsViewController;

    iPhoneView * search;
    FavoritesViewController *favoritesViewController;
    UIWindow *window;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet iPhoneView *search;
@property (nonatomic, retain) FavoritesViewController *favoritesViewController;

@end

ここに私のAppDelegate.mファイルがあります

#import "AppDelegate_iPhone.h"
#import "iPhoneView.h"

@implementation AppDelegate_iPhone

@synthesize window,search,favoritesViewController;


#pragma mark -
#pragma mark Application lifecycle

- (void)applicationDidFinishLaunching:(UIApplication *)application 
{   tabBarController = [[UITabBarController alloc] init];

    homeNavigationController = [[UINavigationController alloc] init];

    search = [[iPhoneView alloc] init];
    [homeNavigationController pushViewController:search animated:NO];

    favouritesNavigationController = [[UINavigationController alloc] init];
    favoritesViewController = [[FavoritesViewController alloc]init];
    [favouritesNavigationController pushViewController:favoritesViewController animated:NO];

    aboutUsViewController =[[AboutUsViewController alloc] init];

    UITabBarItem *item = [[UITabBarItem alloc] initWithTitle:@"επικοινωνία" image:[UIImage imageNamed:@"aboutus"] tag:0];
    aboutUsViewController.tabBarItem = item;
    [item release];

    UITabBarItem *item2 = [[UITabBarItem alloc] initWithTitle:@"αγαπημένα" image:[UIImage imageNamed:@"favorites"] tag:0];
    favouritesNavigationController.tabBarItem = item2;
    [item2 release];

    NSArray *tabBarControllerCollection = [NSArray arrayWithObjects:homeNavigationController,favouritesNavigationController,aboutUsViewController,nil];
    [tabBarController setViewControllers:tabBarControllerCollection animated:NO];

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


- (void)applicationWillResignActive:(UIApplication *)application {
    /*
     Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
     Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
     */
}


- (void)applicationDidEnterBackground:(UIApplication *)application {
    /*
     Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 
     If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
     */
}


- (void)applicationWillEnterForeground:(UIApplication *)application {
    /*
     Called as part of  transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
     */
}


- (void)applicationDidBecomeActive:(UIApplication *)application {
    /*
     Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
     */
}


- (void)applicationWillTerminate:(UIApplication *)application {
    /*
     Called when the application is about to terminate.
     See also applicationDidEnterBackground:.
     */
}


#pragma mark -
#pragma mark Memory management

- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
    /*
     Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
     */
}


- (void)dealloc {
    [tabBarController release];
    [search release];
    [favoritesViewController release];
    [favouritesNavigationController release];
    [aboutUsViewController release];
    [window release];
    [super dealloc];
}


@end
0

1 答え

OK解決はIBの同じアクションでボタンを2回接続しました。私はそれを把握するために48時間を取った!

1
追加された