Extensions to add observers


(Cody Weaver) #1

This is my first time posting anything in the evolution forum or the users
forum, so I apologize if this isn't how we are supposed to do things.

PROPOSAL

My idea is to add a property observer in an extension.

MOTIVATION

This would make it so we can get rid of selectors. It's my understanding
the selectors are "Objective-C".

PROPOSED SOLUTION

   extension UIGestureRecognizer {
      self.state {
         didSet {
            self.handleStateChange()
         }
      }
   }