开发者

Cocoa: Creating a Window with a Variable Number of Interface Elements

I've a 开发者_高级运维window that will have an unknown amount of text fields, determined by the content of a remote server.

In high level terms, how should I go about this? Create a custom view or create an empty window with a backing NSWindowController and then add stuff to it when the window is opened?

I've seen the examples on the O'Reilly Cocoa book and those effectively create a custom NSView. Is this the right way to do it, 8 year later?


You probably want an NSMatrix. A NSMatrix allows you to create an arbitrarily large grid of cells.

Tables, outlines, browser etc are also options depending on your specific needs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜