在 Cocoa(或者一般的 GUI 开发)中,如何指定任意数量的平铺在一起的事物?

发布于 2024-09-01 12:19:19 字数 252 浏览 10 评论 0原文

我是创建 GUI 的新手,到目前为止我所做的一切都是使用命令行。

作为一个实验,我正在尝试创建一个到 Macintosh 的扫雷游戏端口,并且我已经让 CLI 工作了,但是我在使用 GUI 时到处都碰壁了。然而,我要做的第一件事就是能够为网格平铺 nxm 个“盒子”——而且我不知道该怎么做。信息已经准备好交给它,但我不知道在哪里做,或者如何做。

另外,如果有人对网站/Cocoa 开发书籍有任何建议,请随时将它们放在这里......

谢谢!

I'm new to creating GUI's, everything I've done up until this point is using the command line.

I'm trying to create a port of minesweeper to the macintosh, as an experiment, and I've got the CLI working, but I'm running into walls everywhere with the gui. The first thing it seems I have to do, however, is be able to tile n x m 'boxes' for grid - and I'm not sure how to do that. The information is ready to be handed to it, but I don't know where to do it, or how.

Also, if anyone has any recommendations for sites/Cocoa development books, feel free to drop them in here...

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

自我难过 2024-09-08 12:19:19

一般来说,您应该使用为您提供网格布局的控件。 Cocoa 给你两个选择:

In general you should go with controls that give you a grid layout. Cocoa gives you two choices:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文