Creating a reusable UIView with xib (and loading from storyboard)

前端 未结 6 1053
孤独总比滥情好
孤独总比滥情好 2020-11-28 18:49

OK, there are dozens of posts on StackOverflow about this, but none are particularly clear on the solution. I\'d like to create a custom UIView with an accompan

6条回答
  •  清歌不尽
    2020-11-28 19:27

    There is a solution which is much more cleaner than the solutions above: https://www.youtube.com/watch?v=xP7YvdlnHfA

    No Runtime properties, no recursive call problem at all. I tried it and it worked like a charm using from storyboard and from XIB with IBOutlet properties (iOS8.1, XCode6).

    Good luck for coding!

提交回复
热议问题