kevin.cianfarini
03/05/2024, 2:31 PMAnyObject
, what would that be in Kotlin? Any
in Kotlin is just Any
in swift. Would it be Any?
Jeff Lockhart
03/05/2024, 6:22 PMAnyObject
in Swift is the same as the id
type in Objective-C. I believe an abstract class
in Kotlin should satisfy AnyObject
, as Kotlin classes will inherit from the NSObject
base class.kevin.cianfarini
03/05/2024, 7:01 PMAny
worked, which was a bit weird.Jeff Lockhart
03/05/2024, 7:26 PMAny
in Swift basically expands on AnyObject
from Objective-C. Any class from Objective-C or Swift should satisfy AnyObject
. But besides classes, structs, enums, and function types in Swift satisfy Any
, a superset of AnyObject
.