Created
June 27, 2014 14:56
-
-
Save ariok/e7d8df81db6dcf6bc742 to your computer and use it in GitHub Desktop.
[swift]Adding support for "indexOf:" and "contains:" to Array
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
extension Array { | |
func contains(object:AnyObject) -> Bool { | |
return self.bridgeToObjectiveC().containsObject(object) | |
} | |
func indexOf(object:AnyObject) -> Int { | |
return self.bridgeToObjectiveC().indexOfObject(object) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment