简体   繁体   English

在iPhone上模拟绘图纸

[英]Simulating graphing paper on iPhone

I need to implement 'graphing paper' in an iPhone app. 我需要在iPhone应用程序中实现“绘图纸”。 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. 到目前为止,我认为Quartz 2D + UIScrollView是实现此目的的方法,但是这些都是我不熟悉的iPhone开发领域。 Does this seem like a reasonable strategy? 这似乎是一个合理的策略吗?

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). 您也可以创建一个UIView并根据图像为其提供背景色(+ [UIColor colorWithPatternImage:]),但是我自己想使用选项(a)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM