iphone - question regarding global variable -


I need to use all other files to access 1 variable in all the files in NSString's 1 I can use the object

This is a vague question.

If I understand correctly, in that case, you have a global NSString * shared by multiple files, in one of the source files ( .m ),

  NSString * my_global_string = @ "...";  

and all other source files (or a common .h ), insert

  extern NSString * my_global_string;  

Comments

Popular posts from this blog

Indexing in SQL -

objective c - iPhone and it's wireless area -

multithreading - Do lock objects in Java need to be static? -