Delegate.h
@interface AppDelegate : NSObject{ UITabBarController *tabBarController; } @property (nonatomic, retain) IBOutlet UITabBarController *tabBarController;
Delegate.m
@synthesize tabBarController; - (void)showTabBar { [loginController.view removeFromSuperview]; [self.window addSubview:tabBarController.view]; }
TestController.m
#import "Delegate.h" - (IBAction)showTabBar { UIApplication *app = [UIApplication sharedApplication]; [(FindSoneAppDelegate *)app.delegate showTabBar]; }
沒有留言:
張貼留言