Last active
June 30, 2016 14:06
-
-
Save catalinaturlea/48ff1c8312fc60e20fa8 to your computer and use it in GitHub Desktop.
Unnecessary code
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
class MyTest: NSObject { | |
private var identifier: String = "myIdentifier" | |
var defaultContent: [String] | |
init(withItem item: String) { | |
self.defaultContent = [item] | |
} | |
class func fetchInfo(success: (info: [AnyObject: AnyObject]) -> (), failure: ((error: NSError?) -> ())? ) { | |
APIClient.fetchInfoWithSucess({ (request, response, json) -> Void in | |
info = json as? [AnyObject: AnyObject]) | |
success?(info: info) | |
}, failure: { (request, response, error) -> Void in | |
failure?(error: error) | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment