Weak' must not be applied to non-class-bound consider adding a protocol conformance that has a class bound

IosSwiftProtocols

Ios Problem Overview


I have a made a protocol in my VC in which i'm getting the location placemark from one my my swift file class. In my swift class i have declare the protocol like this,

 weak var delegate: HandleMapSearch?

But the xcode is showing me error 'weak' must not be applied to non-class-bound 'HandleMapSearch'; consider adding a protocol conformance that has a class bound . It was working fine before but now when i run the app it shows this error. What is this for and how can i remove this error? This is how i have created protocol in my VC class.

protocol HandleMapSearch {
func dropPinZoomIn(placemark:MKPlacemark)
}

Ios Solutions


Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionraheemView Question on Stackoverflow