English 中文(简体)
当ISWindow的 IB 输出组件初始化时?
原标题:When IBOutlet components of NSWindow are initialized?

我显示模式子分类窗口 :

NSWindowController* controller = [[NSWindowController alloc] initWithWindowNibName: @"MyWindow"];
[NSApp runModalForWindow: [controller window]];

我推翻了我的窗口子类中的 < code> init with Content Rect Rect 风格: (NSRect) content Rect style Mask: (NSUInteger) a Style 支持: (NSBacking StoreType) 缓冲 Type 缓冲 : (BOOL) 旗杆 以设置与 nib 文件相连的儿童视图。 但目前尚未初始化这些儿童( 零) 。

把我的初始代码放在哪里?

最佳回答

nib/ xib 装载器创建对象( 由 < code > init 家族中的一些构建器创建), 并将它们的输出点设置为未定义的顺序。 在它们全部存在和所有输出点设置后, 它会将 < code> awakeFromNib 发送到来自 nib/ xib 文件的所有对象( 接受此信件), 因此这是执行大部分初始化的正确位置 。

问题回答

暂无回答




相关问题
Nested struct variable initialization

How can I initialize this nested struct in C? typedef struct _s0 { int size; double * elems; }StructInner ; typedef struct _s1 { StructInner a, b, c, d, e; long f; char[16] s; }...

How to create a side scroller game?

I want to create a game where the user can go to the right-most part of the screen, and if they go any further, they will slide into a new view. So basically, if they have 3 monsters chasing them on ...

Is Shared ReadOnly lazyloaded?

I was wondering when I write Shared ReadOnly Variable As DataType = New DataType() Or alternatively Shared ReadOnly Variable As New DataType() Is it lazy loaded or as the instance initializes? ...

Multiple initializers in a Go if statement

Just discovered Go, and am very curious so far. I know I m just being lazy, but I want to know if it is possible to initialize multiple variables in an if statement. I know that the following is ...

热门标签