Question : Accessing AppDelegate variable in view controller

I have a variable 'attention' declared in the AppDelegate of my application, and want to use it in a view controller. How do I achieve that?

Here is my code:

AppDelegate.h
1:
2:
3:
4:
5:
6:
7:
8:
9:
@interface MindSpellerAppDelegate : NSObject <UIApplicationDelegate> {
    UIWindow *window;
	
    UITabBarController *tabBarController;

    bool attention;

}


Thanks!

Answer : Accessing AppDelegate variable in view controller

As above use the formula.  You can then use a SUMMARY function on the formula field so you can sort on it.

mlmcc
Random Solutions  
 
programming4us programming4us