arachide
arachide

Reputation: 8076

migrate cocoa touch project to cocoa

I used the codes below to access the variable in the project

appDelegate =(AppDelegate *)[[UIApplication sharedApplication] delegate];
UIApplication *app=[UIApplication sharedApplication];
appDelegate.myInt=1;

It works.

But when I try to migrate the project to Cocoa, I found there is no way to do the same functions as above. How can I use delegate concept to access the global variables (not use 'extern NSInteger myInt')

Welcome any comment

Thanks

interdev

Upvotes: 1

Views: 91

Answers (1)

Abizern
Abizern

Reputation: 150735

Have a look at the NSApplication class documentation

Upvotes: 1

Related Questions