我有一個平底鍋的手勢,我需要檢查手勢何時開始。在Objective-C,你可以使用過載gestureRecognizerShouldBegin與UIPanGestureRecognizer在迅速
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
,並有可能與UIPanGestureRecognizer
- (BOOL)gestureRecognizerShouldBegin:(UIPanGestureRecognizer *)gestureRecognizer
但在迅疾
override func gestureRecognizerShouldBegin(gestureRecognizer: UIPanGestureRecognizer) -> Bool {
重載它不工作,並返回
重寫方法與選擇器'gestureRecognizerShouldBegin:'具有不兼容的類型'(UIPanGestureReco gnizer) - > Bool'
如何在swift中重載此方法?
你並沒有真正回答問題是'如何超載手勢識別器應該爲PanGestures開始' – Macistador 2015-05-20 13:44:10