Unable to connect IBOutlet from storyboard to UIView subclass

前端 未结 9 798
旧巷少年郎
旧巷少年郎 2020-12-05 10:11

I am able to right-click and drag from my custom UIView subclass file to the storyboard elements to connect them, but unable to do so the other way around. I believe this is

9条回答
  •  醉话见心
    2020-12-05 10:42

    Another way just create your button name manually in view controller like this -

    @IBOutlet weak var button: UIButton!
    

    then connect your button via drag to view controller as image shown [!

    PS:- please clean your derived data also.

提交回复
热议问题