Subclassing UIGestureRecognizer with Swift and Xcode 6 - how do I import UIGestureRecognizerSubclass.h?

前端 未结 2 750
轻奢々
轻奢々 2021-01-07 18:13

You can\'t write to self.state in the subclass unless you import UIGestureRecognizerSubclass.h as indicated here.

In a Swift environment, I

2条回答
  •  孤城傲影
    2021-01-07 18:35

    The Swift equivalent is simply:

    import UIKit.UIGestureRecognizerSubclass
    

    That imports the appropriate header.

提交回复
热议问题