What is the File's Owner (in Interface builder)?

后端 未结 4 1530
挽巷
挽巷 2020-12-04 08:06

I am new to Cocoa and I don\'t understand the concept of File\'s Owner of a .nib file.

Here is the way I would see things :

  • Consider a

4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-04 08:30

    File's Owner in Interface Builder is so that it knows the object type of the parent. This is used in two ways. Firstly, in Interface Builder so that IB knows what outlets and actions are available to you to connect. Secondly it is used by the application framework to know how to reconnect things to the rest of your code once the nib file is loaded.

提交回复
热议问题