Board index iPad iOS Programming Global Variables to the whole project in Xcode

+3 votes
6,776 views
asked Mar 1, 2014 in IOS by smile (6,100 points)

Hello, 
 
 
You see, I have doing my first application in xcode for iphone and it has emerged the big question (and I can not find solution anywhere) how I can create variables, and where they can be used by all classes of the project to able to consult and / or modify them from any other class when needed. The idea is to centralize this first and then learn how to get json or some database on some server the value of these variables, but well, that later. 
 
Thanks in advance. A greeting!

3 Answers

0 votes
answered Mar 1, 2014 by osky (127,480 points)

There are two ways to do what you want: centralize members (what you call variables) in your derived class NSApplication or create a singleton object. 
Find examples in Google.

0 votes
answered Mar 1, 2014 by smile (6,100 points)
any thanks, it worked perfectly, it was what I wanted :)
0 votes
answered Nov 6 by karibf69
My contemporary page http://date.inc.xblog.in/?diagram.jayda social media solutions date night gift basket ideas gay dating wales singles dating sites for over 50 dating on
Ask a Question
Welcome to WikiTechSolutions where you can ask questions and receive answers from other members of the community.

You can ask a question without registration.
...