在 iPhone 上模拟方格纸

发布于 2024-08-29 02:20:16 字数 178 浏览 1 评论 0原文

我需要在 iPhone 应用程序中实现“方格纸”。应向用户呈现一个网格。用户可以触摸各个方块来打开它们,或者如果它们已经打开,则关闭它们。用户也可以捏合缩放并在纸张上滚动。

到目前为止,我认为 Quartz 2D + UIScrollView 是这样做,但这都是我不熟悉的 iPhone 开发领域。这看起来是一个合理的策略吗?

I need to implement 'graphing paper' in an iPhone app. The user should be presented with a grid. They user can touch individual squares to turn them on, or if they're already on, off.The user can pinch to zoom and scroll around the paper as well..

So far I'm thinking Quartz 2D + UIScrollView is the way to do this but these are both areas of iPhone development that I'm unfamiliar with. Does this seem like a reasonable strategy?

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

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

发布评论

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

评论(1

晨光如昨 2024-09-05 02:20:16

是的,这就是要走的路。您还可以创建一个 UIView 并根据图像为其指定背景颜色 (+[UIColor colorWithPatternImage:]),但是,我自己,我会选择选项 (a)。

Yes, this would be the way to go. You could also create a UIView and give it a background color based off an image (+[UIColor colorWithPatternImage:]), but, myself, I'd go with option (a).

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