Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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

In a Swift environment, I'm confused how I'd go about importing this. I tried import UIGestureRecognizerSubclass.h, and without the .h, but I still can't write to self.state.

How would I accomplish this?

like image 774
Doug Smith Avatar asked Jun 18 '14 20:06

Doug Smith


1 Answers

The Swift equivalent is simply:

import UIKit.UIGestureRecognizerSubclass 

That imports the appropriate header.

like image 101
Rob Avatar answered Sep 30 '22 05:09

Rob