Created
October 11, 2015 20:42
-
-
Save rknLA/4c3fb228c93175d122b9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var possibleForceValues: Set<CGFloat> = [] | |
func touchUpdatedHandler(touch: UITouch) { | |
let preInsertionLength = possibleForceValues.count | |
possibleForceValues.insert(touch.force) | |
let postInsertionLength = possibleForceValues.count | |
if postInsertionLength - preInsertionLength == 1 { | |
print("inserted unique force: \(touch.force)") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment