Cocoa - Display xib on another xib

前端 未结 2 1312
無奈伤痛
無奈伤痛 2021-02-10 05:55

Can anyone tell me how (or direct me to info on) displaying a .xib (nib) on another .xib (nib).

How ever I wish to place it so I can programically move it around the mai

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-10 06:21

    Thanks a lot, Another alternative ( which is basically the non programming way of doing it ), is to add a NSViewController object in your first xib, and set it to you use the nib name that you specify. In your second xib, don't forget to set the class name in the "custom class" field on the view ( and NSViewController on file's owner ) else that won't work.

提交回复
热议问题