Can't connect IBAction in Xcode

前端 未结 12 1556

When I drag from a button on the storyboard to my view controller Swift file, I only get the option to insert an Outlet or Outlet Collection.

Similarly, if I create the

12条回答
  •  执笔经年
    2021-02-02 13:14

    If extension is causing the problem, then instead of directly extending UIButton, user typealias e.g, create extension of CustomButton instead of UIButton

    typealias CustomButton = UIButton
    extension CustomButton { }
    

提交回复
热议问题