Swift 3 : Delegate within TapGestureRecognizer in Generics doesn't get called

后端 未结 1 1670
伪装坚强ぢ
伪装坚强ぢ 2021-01-25 06:45

I have a protocol like so :

public  protocol SubmitAgeDelegate : class  {
func changeSubmitButtonBool()
}

The problem is I want to call it in a

相关标签:
1条回答
  • 2021-01-25 06:56

    You are never setting the submitAgeDelegate of the GenericController. Having a member of the same name in your MyCell class doesn't help.

    You need to get a reference to your GenericController in order to set its delegate; there's no way around that. (This doesn't have anything to do with generics; it's the same for non-generic classes.) Since it looks like you're using it as a UICollectionViewCell, you might use the reference that you make in tableView:cellForRowAtIndexPath: or similar.

    0 讨论(0)
提交回复
热议问题