 public extension UILongPressGestureRecognizer {
     public convenience init(_ listener:(gestureRecognizer: UILongPressGestureRecognizer) -> () ) {
         self.init(target: ArkUI.self, action: "handleGesture:")
-        ArkUI.addGesture(self, listener: listener)
+        ArkUI.addGesture(self, listener: listener, gestureListeners: &ArkUI.longPressListeners)
     }
     public override func onGesture(listener:(gestureRecognizer: UILongPressGestureRecognizer) -> () ) {
-        ArkUI.addGesture(self, listener: listener)
+        ArkUI.addGesture(self, listener: listener, gestureListeners: &ArkUI.longPressListeners)
     }
     public override func addListener(listener:(gestureRecognizer: UILongPressGestureRecognizer) -> () ) {
-        ArkUI.addGesture(self, listener: listener)
+        ArkUI.addGesture(self, listener: listener, gestureListeners: &ArkUI.longPressListeners)
     }
     public override func removeListener(listener:(gestureRecognizer: UILongPressGestureRecognizer) -> () ) {
-        ArkUI.removeGesture(self, listener: listener)
+        ArkUI.removeGesture(self, listener: listener, gestureListeners: &ArkUI.longPressListeners)
     }
 }
 
 public extension UIPanGestureRecognizer {
     public convenience init(_ listener:(gestureRecognizer: UIPanGestureRecognizer) -> () ) {
         self.init(target: ArkUI.self, action: "handleGesture:")
-        ArkUI.addGesture(self, listener: listener)
+        ArkUI.addGesture(self, listener: listener, gestureListeners: &ArkUI.panListeners)
     }
     public override func onGesture(listener:(gestureRecognizer: UIPanGestureRecognizer) -> () ) {
-        ArkUI.addGesture(self, listener: listener)
+        ArkUI.addGesture(self, listener: listener, gestureListeners: &ArkUI.panListeners)
     }
     public override func addListener(listener:(gestureRecognizer: UIPanGestureRecognizer) -> () ) {
-        ArkUI.addGesture(self, listener: listener)
+        ArkUI.addGesture(self, listener: listener, gestureListeners: &ArkUI.panListeners)
     }
     public override func removeListener(listener:(gestureRecognizer: UIPanGestureRecognizer) -> () ) {
-        ArkUI.removeGesture(self, listener: listener)
+        ArkUI.removeGesture(self, listener: listener, gestureListeners: &ArkUI.panListeners)
     }
 }
 
 public extension UIPinchGestureRecognizer {
     public convenience init(_ listener:(gestureRecognizer: UIPinchGestureRecognizer) -> () ) {
         self.init(target: ArkUI.self, action: "handleGesture:")
-        ArkUI.addGesture(self, listener: listener)
+        ArkUI.addGesture(self, listener: listener, gestureListeners: &ArkUI.pinchListeners)
     }
     public override func onGesture(listener:(gestureRecognizer: UIPinchGestureRecognizer) -> () ) {
-        ArkUI.addGesture(self, listener: listener)
+        ArkUI.addGesture(self, listener: listener, gestureListeners: &ArkUI.pinchListeners)
     }
     public override func addListener(listener:(gestureRecognizer: UIPinchGestureRecognizer) -> () ) {
-        ArkUI.addGesture(self, listener: listener)
+        ArkUI.addGesture(self, listener: listener, gestureListeners: &ArkUI.pinchListeners)
     }
     public override func removeListener(listener:(gestureRecognizer: UIPinchGestureRecognizer) -> () ) {
-        ArkUI.removeGesture(self, listener: listener)
+        ArkUI.removeGesture(self, listener: listener, gestureListeners: &ArkUI.pinchListeners)
     }
 }
 
 public extension UIRotationGestureRecognizer {
     public convenience init(_ listener:(gestureRecognizer: UIRotationGestureRecognizer) -> () ) {
         self.init(target: ArkUI.self, action: "handleGesture:")
-        ArkUI.addGesture(self, listener: listener)
+        ArkUI.addGesture(self, listener: listener, gestureListeners: &ArkUI.rotationListeners)
     }
     public override func onGesture(listener:(gestureRecognizer: UIRotationGestureRecognizer) -> () ) {
-        ArkUI.addGesture(self, listener: listener)
+        ArkUI.addGesture(self, listener: listener, gestureListeners: &ArkUI.rotationListeners)
     }
     public override func addListener(listener:(gestureRecognizer: UIRotationGestureRecognizer) -> () ) {
-        ArkUI.addGesture(self, listener: listener)
+        ArkUI.addGesture(self, listener: listener, gestureListeners: &ArkUI.rotationListeners)
     }
     public override func removeListener(listener:(gestureRecognizer: UIRotationGestureRecognizer) -> () ) {
-        ArkUI.removeGesture(self, listener: listener)
+        ArkUI.removeGesture(self, listener: listener, gestureListeners: &ArkUI.rotationListeners)
     }
 }
 
 public extension UISwipeGestureRecognizer {
     public convenience init(_ listener:(gestureRecognizer: UISwipeGestureRecognizer) -> () ) {
         self.init(target: ArkUI.self, action: "handleGesture:")
-        ArkUI.addGesture(self, listener: listener)
+        ArkUI.addGesture(self, listener: listener, gestureListeners: &ArkUI.swipeListeners)
     }
     public override func onGesture(listener:(gestureRecognizer: UISwipeGestureRecognizer) -> () ) {
-        ArkUI.addGesture(self, listener: listener)
+        ArkUI.addGesture(self, listener: listener, gestureListeners: &ArkUI.swipeListeners)
     }
     public override func addListener(listener:(gestureRecognizer: UISwipeGestureRecognizer) -> () ) {
-        ArkUI.addGesture(self, listener: listener)
+        ArkUI.addGesture(self, listener: listener, gestureListeners: &ArkUI.swipeListeners)
     }
     public override func removeListener(listener:(gestureRecognizer: UISwipeGestureRecognizer) -> () ) {
-        ArkUI.removeGesture(self, listener: listener)
+        ArkUI.removeGesture(self, listener: listener, gestureListeners: &ArkUI.swipeListeners)
     }
 }
 

public extension UIGestureRecognizer {
    public convenience init(_ listener:(gestureRecognizer: UIGestureRecognizer) -> () ) {
        self.init(target: ArkUI.self, action: "handleGesture:")
        ArkUI.addGesture(self, listener: listener)
    }
    public func onGesture(listener:(gestureRecognizer: UIGestureRecognizer) -> () ) {
        ArkUI.addGesture(self, listener: listener)
    }
    public func addListener(listener:(gestureRecognizer: UIGestureRecognizer) -> () ) {
        ArkUI.addGesture(self, listener: listener)
    }
    public func removeListener(listener:(gestureRecognizer: UIGestureRecognizer) -> () ) {
        ArkUI.removeGesture(self, listener: listener)
    }
}

public extension UITapGestureRecognizer {
    public convenience init(_ listener:(gestureRecognizer: UITapGestureRecognizer) -> () ) {
        self.init(target: ArkUI.self, action: "handleGesture:")
        ArkUI.addGesture(self, listener: listener)
    }
    public override func onGesture(listener:(gestureRecognizer: UITapGestureRecognizer) -> () ) {
        ArkUI.addGesture(self, listener: listener)
    }
    public override func addListener(listener:(gestureRecognizer: UITapGestureRecognizer) -> () ) {
        ArkUI.addGesture(self, listener: listener)
    }
    public override func removeListener(listener:(gestureRecognizer: UITapGestureRecognizer) -> () ) {
        ArkUI.removeGesture(self, listener: listener)
    }

}

    static var swipeListeners = Dictionary<WeakKey<UISwipeGestureRecognizer>,Array<(gestureRecognizer: UISwipeGestureRecognizer) -> ()>>()
    static var tapListeners = Dictionary<WeakKey<UITapGestureRecognizer>,Array<(gestureRecognizer: UITapGestureRecognizer) -> ()>>()
    
    static func addGesture<T: UIGestureRecognizer>(gesture: T, listener: (gestureRecognizer: T) -> (),inout gestureListeners: Dictionary<WeakKey<T>,Array<(gestureRecognizer: T) -> ()>> ) {
        WeakCollections.clean(&gestureListeners)
        let gestureKey = WeakCollections.weakKeyOrNew(gesture, dict: gestureListeners)
        var listenersForKey = gestureListeners[gestureKey]
        if listenersForKey == nil {
            listenersForKey = Array<(gestureRecognizer: T) -> ()>()
            gestureListeners[gestureKey] = listenersForKey
        }
        listenersForKey!.append(listener)
        gestureListeners[gestureKey] = listenersForKey
    }

    static func removeGesture<T: UIGestureRecognizer>(gesture: T, listener:(gestureRecognizer: T) -> (),inout gestureListeners: Dictionary<WeakKey<T>,Array<(gestureRecognizer: T) -> ()>> ) {
        WeakCollections.clean(&gestureListeners)
        if let gestureKey = WeakCollections.weakKey(gesture, dictionary: gestureListeners) {
            var lists = gestureListeners[gestureKey]!
