开发者

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

开发者 https://www.devze.com 2022-12-25 22:45 出处:网络
I\'ve a 开发者_高级运维window that will have an unknown amount of text fields, determined by the content of a remote server.

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

精彩评论

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