Last active
May 5, 2016 01:04
-
-
Save nfarah86/9b9d0e95d3a6d5d9825589a3163e7dcf to your computer and use it in GitHub Desktop.
BeanDetailViewController- Connecting to the Bean
This file contains 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
@implementation BeanDetailViewController | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
// Once we load, we will create a singleton and connect to the Bean we selected. | |
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; | |
appDelegate.beanDetailViewController = self; | |
NSError *error = nil; | |
[self.bean.beanManager connectToBean:self.bean error:&error]; | |
self.bean.delegate = self; | |
NSLog(@"View did load with bean %@. Status = %d", self.bean, (int)self.bean.state); | |
// omitted code | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment