Skip to content

Instantly share code, notes, and snippets.

@ariok
Created June 27, 2014 14:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ariok/e7d8df81db6dcf6bc742 to your computer and use it in GitHub Desktop.
Save ariok/e7d8df81db6dcf6bc742 to your computer and use it in GitHub Desktop.
[swift]Adding support for "indexOf:" and "contains:" to Array
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