摘要:
@objc vs @objc dynamic @objc: Objective-C entry points One can explicitly write @objc on any Swift declaration that can be expressed in Objective-C. @ 阅读全文
摘要:
以NSObject为基类,只是为了提供Objective-C API的使用入口; 经由@object修改的对象,是这些api的参量。 NSObject是swift与oc特有机制沟通的桥梁。 Subclassing NSObject in Swift gets you Objective-C runt 阅读全文
摘要:
Objective-C entry points https://github.com/apple/swift-evolution/blob/master/proposals/0160-objc-inference.md Before Swift 4, the compiler made some 阅读全文
摘要:
1、扩展中无法继承重写已有函数,不能添加函数。 Extensions can add new functionality to a type, but they cannot override existing functionality. https://docs.swift.org/swift- 阅读全文
摘要:
Normally, in a typed language, the dispatch mechanism will be performed based on the type of the arguments (most commonly based on the type of the rec 阅读全文
摘要:
动态类型的关键是将动态对象与实际类型信息绑定。 See also: Dynamic programming language and Interpreted language Dynamic type checking is the process of verifying the type saf 阅读全文
摘要:
New operators are declared at a global level using the operator keyword, and are marked with the prefix, infix or postfix modifiers: prefix operator + 阅读全文