ios - UIGestureRecogniser key-value coding -
ios - UIGestureRecogniser key-value coding -
i trying utilize key-value coding on uigesturerecogniser
. line of code below crashes when tries set value. uigesturerecogniser
compliant key-value coding protocol , alternatives can used?
gesture.setvalue(nsvalue(cgpoint: draggedobjectoffset), forkey: "draggedobjectoffset")
*** terminating app due uncaught exception 'nsunknownkeyexception', reason: '[ setvalue:forundefinedkey:]: class not key value coding-compliant key draggedobject.'
the issue not uigesturerecognizer
doesn't adhere key value coding protocol, it's doesn't take values key "draggedobjectoffset"
. key value coding in many ways similar @property
statements. can't assign arbitrary info arbitrary keys objects claim "key value coding-compliant".
i suggest writing simple subclass accomplish task.
ios swift uigesturerecognizer
Comments
Post a Comment