objective c - iphone global variable -


I want to open my SQLite database in my App Delegate class and references that in all my other classes in the database I have a database Have tried: static sqlite3 * database = zero;

But when I append it to my other classes. If I try to refer to the database, then "error: request for member" is not a structure or association in some way. "How do you reference these types of proprians?

You should use any variable that is stored in an app representative, follow the normal formula:

  YourAppDelegateName * delegate = (YourAppDelegateName *) [[UIApplication ShareApp] representative]; // The use of specific variables in the rep is as follows: sqlite3 * temp = delegate.database;  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -