Hi,
How can i listen annotation selection changes? I try this code but i’m getting error “Cannot assign to property: ‘lineAnnotation’ is immutable”
var lineAnnotation = SCILineAnnotation()
lineAnnotation.annotationSelectionChangedListener = { (annotation, isSelected) in
//
}
Tnx.
- apiftechnics api asked 4 years ago
- You must login to post comments
Hi there,
You missed return type in your closure, please see the API docs
Thats actually a mistake in API and that will be fixed in one of the next nightly builds
For now, please use the code like below:
lineAnnotation.annotationSelectionChangedListener = { (annotation, isSelected) -> Bool in
print("isSelected: \(isSelected)")
return true
}
Hope that helps.
Best Regards,
Nazar R.
- Nazar Rudnyk answered 4 years ago
-
Thanks.
- You must login to post comments
Please login first to submit.