How do I set a property on a custom view instantiated from a XIB

后端 未结 3 489
逝去的感伤
逝去的感伤 2021-01-29 01:22

I am just trying to get my head around MVC in Objective C and IOS but am having a problem I\'m hoping someone can help me with.

I have created a custom view (created as

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-29 01:54

    You can just create another property on your view controller of type MyCustomView*.

    Declare that property as an IBOutlet and you wire that up in IB.

    Then in your view controller you can use that property to access that custom view.

提交回复
热议问题