Skip to content

Instantly share code, notes, and snippets.

@sprite2005
Created May 13, 2011 08:05
Show Gist options
  • Save sprite2005/970179 to your computer and use it in GitHub Desktop.
Save sprite2005/970179 to your computer and use it in GitHub Desktop.
AppDelegate.m
- (IBAction) switchViews
{
if (self.window.rootViewController == self.viewController) {
self.window.rootViewController = self.settingsNavigationViewController;
} else {
self.window.rootViewController = self.viewController;
}
}
AppDelegate.h
#import <UIKit/UIKit.h>
@class FlicktasticViewController;
@class SettingsViewController;
@interface FlicktasticAppDelegate : NSObject <UIApplicationDelegate> {
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet FlicktasticViewController *viewController;
@property (nonatomic, retain) IBOutlet UINavigationController *settingsNavigationViewController;
- (IBAction) switchViews;
@end
Both view controllers are created in MainWindow.xib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment