Can we pass a parameter to view did load or view will appear of other class from a class

后端 未结 4 1262
悲&欢浪女
悲&欢浪女 2021-01-27 09:54

Sorry if it is not a standard question, but now your solutions can help me out. In my app, I have two classes: ClassA and ClassB. ClassB

4条回答
  •  深忆病人
    2021-01-27 10:10

    You pass the value to your class or object constructor. You then save the value to a property in that class. You then access that property from the view did load, or your other events.

    This is more a general programming concept, than anything related to objective c, the iPad, etc.

    So, in your header file, you define a property. Then you synthesize that property the c file. Then you set the property in the constructor. Then you access the property in your view did load event.

提交回复
热议问题