Avatar
norio_nomura 6/1/2018 10:28 AM
$ swift Welcome to Apple Swift version 4.1.2 (swiftlang-902.0.54 clang-902.0.39.2). Type :help for assistance. 1> import Foundation 2. 3. var str = "Hello, playground" 4. let a = str as AnyObject 5. let selector = Selector("description") 6. if a.responds(to: selector) { 7. print(a.perform(selector).takeUnretainedValue()) 8. } Hello, playground str: String = "Hello, playground" a: _NSContiguousString = "Hello, playground" selector: Selector = "description"