Xcode Playground Killer Codes
Xcode Playground Killer Codes in Swift Language (from Xcode 6 Beta 2)
Iteration of AnyObject?
Returning Tuple in Extension
Sweet! :-p
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
댓글