MapPinAnnotation is a class of MKAnnotation type in which I have defined
var lblNotificationCount:UILabel!
I want to set text at label but getting error as described below: -
let storeAnnotation = annotation as! MapPinAnnotation
and in console i am able to get value of count but it print error as below: -
Console Output:
Count: 1
fatal error: unexpectedly found nil while unwrapping an Optional value
Please help, how to resolve this issue. Thanks in advance.