As I have written about before, the most difficult part of Objective-C for me is getting the variable declarations to work correctly. The lesson of today is where variables need to be declared and what each area does specifically. There are two types of variables, public and private. In standard class declaration you have a header (.h) and an implementation file (.m). Getting global objects is completely different from creating global variables. Ironically enough, I was able to get local objects and global variables working correctly, but the opposite proved difficult because of the differences in Objective-C. The following displays the differences in variable declaration.
Local Boolean Variable:
Global Boolean Variable:
As you can see, this process is incredibly simple, but proves quite challenging when you are trying to write everything like it was C#. As far as global and local objects are concerned, global objects can be set up with a singleton class. Once the class is set up, you just access the class manager to change any objects that you have created within it. My singleton class looks lik
And finally you can access any of the objects in the singleton class like so:
Hopefully this helps anyone starting with Objective-C.