3 ms·
Anyone noticed that this NSTouchBar API is not support Objective-C, it is swift-only. Does it mean we would only code Swift for iOS/OS X some day?
by tcper 10y ago
Anyone noticed that this NSTouchBar API is not support Objective-C, it is swift-only. Does it mean we would only code Swift for iOS/OS X some day?
- panic 10y agoThis is a link to the Objective-C API, which is why the "Objective-C" link is disabled (you're already looking at it).
- forgettableuser 10y agoI see where the confusion comes from. The example in the middle is in Swift, regardless of which language you've selected. But the API list at the bottom does reflect your current language selection.
- chris_7 10y agoIt subclasses the typical Foundation/AppKit classes, so I don't think that is the case.
- pjmlp 10y agoMost likely Apple is not going to rewrite everything in Swift as that usually leads to more bugs due to missing documentation, but they are pretty clear it is a replacement to C and Objective-C for new code. "Swift is a successor to both the C and Objective-C languages." -- https://developer.apple.com/swift/ https://developer.apple.com/swift/ " Swift is intended as a replacement for C-based languages (C, C++, and Objective-C)." -- https://swift.org/about/ https://swift.org/about/ Also on Sierra, launchd and the Dock have been rewritten in Swift.