 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)
     }
 }
 

    static var swipeListeners = Dictionary<WeakKey<UISwipeGestureRecognizer>,Array<(gestureRecognizer: UISwipeGestureRecognizer) -> ()>>()
    static var tapListeners = Dictionary<WeakKey<UITapGestureRecognizer>,Array<(gestureRecognizer: UITapGestureRecognizer) -> ()>>()
    
    static func addGesture(gesture: UIGestureRecognizer, listener: (gestureRecognizer: UIGestureRecognizer) -> ()) {
        WeakCollections.clean(&gestureListeners)
        let gestureKey = WeakCollections.weakKeyOrNew(gesture, dict: gestureListeners)
        var listeners = gestureListeners[gestureKey]
        if listeners == nil {
            listeners = Array<(gestureRecognizer: UIGestureRecognizer) -> ()>()
            gestureListeners[gestureKey] = listeners
        }
        listeners!.append(listener)
        gestureListeners[gestureKey] = listeners
    }
    
    static func addGesture(gesture: UIPanGestureRecognizer, listener: (gestureRecognizer: UIPanGestureRecognizer) -> ()) {
        WeakCollections.clean(&panListeners)
        let gestureKey = WeakCollections.weakKeyOrNew(gesture, dict: panListeners)
        var listeners = panListeners[gestureKey]
        if listeners == nil {
            listeners = Array<(gestureRecognizer: UIPanGestureRecognizer) -> ()>()
            panListeners[gestureKey] = listeners
        }
        listeners!.append(listener)
        panListeners[gestureKey] = listeners
    }
    
    static func addGesture(gesture: UISwipeGestureRecognizer, listener: (gestureRecognizer: UISwipeGestureRecognizer) -> ()) {
        var gestureListeners = swipeListeners
        WeakCollections.clean(&gestureListeners)
        let gestureKey = WeakCollections.weakKeyOrNew(gesture, dict: gestureListeners)
        var listeners = gestureListeners[gestureKey]
        if listeners == nil {
            listeners = Array<(gestureRecognizer: UISwipeGestureRecognizer) -> ()>()
            gestureListeners[gestureKey] = listeners
        }
        listeners!.append(listener)
        gestureListeners[gestureKey] = listeners
        self.swipeListeners = gestureListeners
    }
    
    static func addGesture(gesture: UITapGestureRecognizer, listener: (gestureRecognizer: UITapGestureRecognizer) -> ()) {
        var gestureListeners = tapListeners
        println("add tap gesture")
        WeakCollections.clean(&gestureListeners)
        let gestureKey = WeakCollections.weakKeyOrNew(gesture, dict: gestureListeners)
        var listeners = gestureListeners[gestureKey]
        if listeners == nil {
            listeners = Array<(gestureRecognizer: UITapGestureRecognizer) -> ()>()
            gestureListeners[gestureKey] = listeners
        }
        listeners!.append(listener)
        gestureListeners[gestureKey] = listeners
        self.tapListeners = gestureListeners
    }
    
    static func addGesture(gesture: UIPinchGestureRecognizer, listener: (gestureRecognizer: UIPinchGestureRecognizer) -> ()) {
        var gestureListeners = pinchListeners
        WeakCollections.clean(&gestureListeners)
        let gestureKey = WeakCollections.weakKeyOrNew(gesture, dict: gestureListeners)
        var listeners = gestureListeners[gestureKey]
        if listeners == nil {
            listeners = Array<(gestureRecognizer: UIPinchGestureRecognizer) -> ()>()
            gestureListeners[gestureKey] = listeners
        }
        listeners!.append(listener)
        gestureListeners[gestureKey] = listeners
        self.pinchListeners = gestureListeners
    }
    
    static func addGesture(gesture: UILongPressGestureRecognizer, listener: (gestureRecognizer: UILongPressGestureRecognizer) -> ()) {
        var gestureListeners = longPressListeners
        WeakCollections.clean(&gestureListeners)
        let gestureKey = WeakCollections.weakKeyOrNew(gesture, dict: gestureListeners)
        var listeners = gestureListeners[gestureKey]
        if listeners == nil {
            listeners = Array<(gestureRecognizer: UILongPressGestureRecognizer) -> ()>()
            gestureListeners[gestureKey] = listeners
        }
        listeners!.append(listener)
        gestureListeners[gestureKey] = listeners
        self.longPressListeners = gestureListeners
    }
    
    static func addGesture(gesture: UIRotationGestureRecognizer, listener: (gestureRecognizer: UIRotationGestureRecognizer) -> ()) {
        var gestureListeners = rotationListeners
        WeakCollections.clean(&gestureListeners)
        let gestureKey = WeakCollections.weakKeyOrNew(gesture, dict: gestureListeners)
        var listeners = gestureListeners[gestureKey]
        if listeners == nil {
            listeners = Array<(gestureRecognizer: UIRotationGestureRecognizer) -> ()>()
            gestureListeners[gestureKey] = listeners
        }
        listeners!.append(listener)
        gestureListeners[gestureKey] = listeners
        self.rotationListeners = gestureListeners
    }
    
    static func removeGesture(gesture: UIGestureRecognizer, listener:(gestureRecognizer: UIGestureRecognizer) -> () ) {
        WeakCollections.clean(&gestureListeners)
        if let gestureKey = WeakCollections.weakKey(gesture, dictionary: gestureListeners) {
            var lists = gestureListeners[gestureKey]!

        }
    }
    
    public static dynamic func handleGesture(gesture: UIGestureRecognizer) {
        println("handle gesture")
        if let gest = gesture as? UITapGestureRecognizer {
            if let lists = WeakCollections.valueForWeakKey(gest, dict: tapListeners) {
                for f in lists {
                    f(gestureRecognizer: gest)
                }
            }
        } else if let gest = gesture as? UIPinchGestureRecognizer {
            if let lists = WeakCollections.valueForWeakKey(gest, dict: pinchListeners) {
                for f in lists {
                    f(gestureRecognizer: gest)
                }
            }
        } else if let gest = gesture as? UILongPressGestureRecognizer {
            if let lists = WeakCollections.valueForWeakKey(gest, dict: longPressListeners) {
                for f in lists {
                    f(gestureRecognizer: gest)
                }
            }
        } else if let gest = gesture as? UIPanGestureRecognizer {
            if let lists = WeakCollections.valueForWeakKey(gest, dict: panListeners) {
                for f in lists {
                    f(gestureRecognizer: gest)
                }
            }
        } else if let gest = gesture as? UIRotationGestureRecognizer {
            if let lists = WeakCollections.valueForWeakKey(gest, dict: rotationListeners) {
                for f in lists {
                    f(gestureRecognizer: gest)
                }
            }
        } else if let gest = gesture as? UISwipeGestureRecognizer {
            if let lists = WeakCollections.valueForWeakKey(gest, dict: swipeListeners) {
                for f in lists {
                    f(gestureRecognizer: gest)
