Acess Instance Variables of the Application Delegate in Objective-C


/ Published in: Objective C
Save to your folder(s)



Copy this code and paste it in your HTML
  1. // #import "yourappAppDelegate.h" in .h
  2.  
  3. // Get the yourappAppDelegate
  4. yourappAppDelegate *appDelegate = (yourappAppDelegate *)[UIApplication sharedApplication].delegate;
  5.  
  6. // Show some instance variables
  7. NSLog(@"appdelegates instance variable: %@",appDelegate.someinstancevariable);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.