Created
April 28, 2015 15:55
-
-
Save MickaelCruzDB/9fc857de263a8ab68ed4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func touchesMoved(touches: Set<NSObject>, withEvent event: UIEvent) { | |
let location:CGPoint? = touches.anyObject()?.locationInView(self) | |
if let loc = location { | |
if (!CGRectContainsPoint(ScaleRect(self.bounds, n: 2.0), loc)) | |
{ | |
self.highlighted = false | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
override func touchesMoved(touches: Set, withEvent event: UIEvent) {
touches.first
let location:CGPoint? = touches.first.locationInView(self)
if let loc = location {
if (!CGRectContainsPoint(ScaleRect(self.bounds, n: 2.0), loc))
{
self.highlighted = false
}
}
}