Need job

Looking for job in Europe. Please contact thru LinkedIn profile.

Thursday, February 9, 2017

Swift weak delegate

When you need to declare weak delegate property you may caught " 'weak' may only be applied to class and class-bound protocol types, not 'SwipePickerDelegate'".


Apple mentioned this in docs here:
https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Protocols.html#//apple_ref/doc/uid/TP40014097-CH25-ID281

So, all you need is add "class" keyword to protocol.