Access Variable from Another Class - Objective-C

后端 未结 3 1833
孤独总比滥情好
孤独总比滥情好 2021-01-22 13:15

This question has probably been asked before so I\'m sorry.

I am working on an iPhone app and lets say I have a variable, var, in class1. I want to add a UIButton in cl

3条回答
  •  有刺的猬
    2021-01-22 14:03

    Try using a singleton http://developer.apple.com/library/mac/#documentation/General/Conceptual/DevPedia-CocoaCore/Singleton.html If you can't figure it out by reading through that let me know and I'll make an example!

提交回复
热议问题