Post

Replies

Boosts

Views

Activity

Reply to The File’s Owner object of a NIB file
Matt Neuburg provides his own definition in his book "iOS 14 Programming Fundamentals with Swift": So what is the nib owner object? It’s a proxy representing an instance that already exists outside the nib at the time that the nib is loaded. When the nib is loaded, the nib-loading mechanism doesn’t instantiate that object; the nib owner is already an instance. Instead, the nib-loading mechanism substitutes the real, already existing instance for the nib owner object, using the real instance to fulfill any connections that involve the nib owner.
Nov ’20
Reply to The File’s Owner object of a NIB file
@OOPer It cannot be the reason. As you know, you can replace nil with an instance. Or you may be using the word instance in some other ways? The point is, the File Owner object IS actually an instance. Are you saying it's not? I'm just curious as to the order in which it gets instantiated and what the type of it is.
Nov ’20
Reply to The File’s Owner object of a NIB file
Thank you for your answer, but I think @OOPer misunderstood my question. As far as I understand, the File Owner object is already an instance, not a type, when NIB is loaded. This is understandable because the entity that's going to substitute this File owner object is also an instance. But, at which point does this File Owner object get instantiated? Is it before NIB is loaded or after? NIB is lazy loaded, meaning it's only loaded when it is called by a certain instance, which means the order in which the File Owner object gets instantiated is either: NIB gets called and lazy loaded File Owner object gets instantiated The caller object substitutes the instance of the File Owner object or File Owner object gets instantiated NIB gets called and lazy loaded The caller object substitutes the instance of the File Owner object Also @OOPer mentioned that It may change dynamically when loading the nib. in regards to what the "type" of the File Owner object is. I'm aware that it eventually gets substituted by an instance of another type, but what I'm actually curious about is that since the File Owner object is already an instance as a placeholder, what is it an instance of prior to being substituted by something else?
Oct ’20