swift

bitmask in swift

> bitmask 연산중 & 연산의 결과는 nil인지 아닌지로 판단한다. if multipleOptions & .SecondOption != nil { // see note println("multipleOptions has SecondOption") } http://stackoverflow.com/questions/24066170/swift-ns-options-style-bitmask-enumerations

locale vs AMSymbol, PMSymbol ?

extension NSDate { public func formatter(formatString:String) -> String { let formatter = NSDateFormatter() formatter.dateFormat = formatString formatter.AMSymbol = "오전" formatter.PMSymbol = "오후" // formatter.locale = NSLocale(localeIdentifier: NSLocale.preferredLanguages().first as? String ?? "ko-KR") return formatter.