更新时间:2023-02-19 15:11:11
NSBundle
类方法 loadNibNamed:owner:
在 OS X v10.8 中已弃用,loadNibNamed:owner:topLevelObjects:
是 不是 和评论 在文档中说明原因:
The NSBundle
class method loadNibNamed:owner:
is deprecated in OS X v10.8,loadNibNamed:owner:topLevelObjects:
is not and the comments in the documentation state why:
与遗留方法不同,对象遵循标准的可可内存管理规则;有必要通过使用 IBOutlets 或持有对数组的引用来保持对它们的强引用,以防止 nib 内容被释放.