Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing initializer compatible to InterfaceBuilder #2

Open
backboon opened this issue Jun 12, 2017 · 0 comments
Open

Missing initializer compatible to InterfaceBuilder #2

backboon opened this issue Jun 12, 2017 · 0 comments

Comments

@backboon
Copy link

Hello developers,

workflow to reproduce issue:

  • add WSMorseGestureRecognizer as "Custom Gesture" to view in storyboard/xib
  • set delegate, target/action
  • set reference to your code as outlet
  • configure gesture in code or in InterfaceBuilder via keyPath (e.g. stringToRecignize, characterParseDelay, wordParseDelay)

expected:

  • if entered/touched morse code matches with "stringToRecignize", the calback/action should be triggered

issue:

  • no morse code is recognized, any callback (morsecode, character, word) return empty string, action is never triggered

analysis:

  • mutable array "currentSequence" is not initialized
  • although the UIGestureRecognizer is no NSCoder conforming UI class it is used in InterfaceBuilder
  • you have to implement NSCoder initialiser "-[NSCoder initWithCoder:]" or at least override "-[NSObject init]" where you should setup your properties; at least "currentSequence"

best regards, Oliver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant