javascript
가장 많은 플랫폼에서 돌아가는 언어
* 함수형 언어에 가까움
* GC
* 생산성은 단연 최고
* 거의 모든 플랫폼을 커버 할 수 있음
usecase
* browser/server/desktop/mobile programs
link
* https://developer.mozilla.org/ko/docs/
> bitmask 연산중 & 연산의 결과는 nil인지 아닌지로 판단한다.
if multipleOptions & .SecondOption != nil { // see note
println("multipleOptions has SecondOption")
}
http://stackoverflow.com/questions/24066170/swift-ns-options-style-bitmask-enumerations
ISSUE
import XCTest
import topic
class SchemeHandlerTest: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func
자동완성이 안되어서 조금 헤매였다.
// objective-c
[self class]
// swift
self.dynamicType
LINK
http://stackoverflow.com/questions/24049673/swift-class-introspection-generics
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.