Best way to pass variables between views

前端 未结 4 1406
走了就别回头了
走了就别回头了 2020-12-21 12:56

I am very new to xcode & Objective-C (having come from PHP) i have started to play around and am finding it very hard to pass variables between views this is what i have

4条回答
  •  被撕碎了的回忆
    2020-12-21 13:27

    Merely including the header file will not make the variable available. You are only including the definition of the class (class is for PHP what @interface is for Obj-C) You have to instantiate Game_Info and access the variable via the instance of Game_Info.

提交回复
热议问题