Skip to content

Instantly share code, notes, and snippets.

@nfarah86
Last active May 5, 2016 01:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nfarah86/9b9d0e95d3a6d5d9825589a3163e7dcf to your computer and use it in GitHub Desktop.
Save nfarah86/9b9d0e95d3a6d5d9825589a3163e7dcf to your computer and use it in GitHub Desktop.
BeanDetailViewController- Connecting to the Bean
@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