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

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -