Iteration of AnyObject?
import Cocoa let fm = NSFileManager.defaultManager() var error: NSError? let contents = fm.contentsOfDirectoryAtPath("/foo/bar", error: &error) for content: String! in contents { content }
Returning Tuple in Extension
import Foundation extension NSDate { var testProperty: (Int, Int, Int) { return (0, 0, 0) } } NSDate.date().testProperty
Sweet! :-p
0 comments:
댓글 쓰기