Last active
August 29, 2015 13:57
-
-
Save consoledotblog/9487706 to your computer and use it in GitHub Desktop.
How to Share View Controllers for iPhone and iPad Using Nibs for Reuse and Portability
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "SLMainViewController.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Override point for customization after application launch. | |
SLMainViewController *mainViewController = [[SLMainViewControlleralloc] init]; | |
self.window.rootViewController = mainViewController; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(NSString *)nibName { | |
return @"SLMainViewController" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface SLMainViewController () | |
@property (weak, nonatomic) IBOutlet UILabel *greetingLabel; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
// Do any additional setup after loading the view from its nib. | |
self.greetingLabel.text = [NSString stringWithFormat:"%@ %@", self.greetingLabel.text, "Vinny"]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment