swift protocol, IBOutlet property cannot have non-object type

后端 未结 6 1077
梦毁少年i
梦毁少年i 2020-12-15 20:11

I would like to wire up a custom swift delegate in IB. The delegate is an object that implements a certain protocol in swift.

protocol ThumbnailTableViewCel         


        
6条回答
  •  春和景丽
    2020-12-15 21:11

    IBOutlets are to indicate a pointer to an object stored in a nib (or storyboard) file. A protocol is not an object, therefore you can't have one in a nib file. Make the type of the IBOutlet var to be the type of the actual object you have in the nib.

提交回复
热议问题