在 iPhone 上模拟方格纸
我需要在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,这就是要走的路。您还可以创建一个 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).