大佬教程收集整理的这篇文章主要介绍了iphone – 如何创建一个允许用户自由手绘的应用程序?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我有任务开发像iDesk应用程序的应用程序,我不知道如何从应用程序开始.
这个应用程序有1.徒手绘图2.形状识别&更多功能.但我不知道如何从这个应用程序开始.
请帮帮我.
提供有关如何创建此应用程序的一些详细信息.我认为这个应用程序是从openGL创建的.如果可能,请提供一些样品.
请帮帮我.
我已经发布了有关此主题的新问题New Question for this topic
请帮我解决一下这个.
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { mouseSwiped = NO; UITouch *touch = [touches anyObject]; if ([touch tapCount] == 2) { [drawImage setImage:[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForresource:@"white" ofType:@"png"]]]; return; } lastPoint = [touch LOCATIOnInView:self.view]; lastPoint.y -= 20; } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { mouseSwiped = YES; UITouch *touch = [touches anyObject]; CGPoint currentPoint = [touch LOCATIOnInView:self.drawImage]; currentPoint.y -= 20; NSLog(@"current Point is x: %d,y: %d",currentPoint.x,currentPoint.y); UIGraphicsBeginImageContext(self.drawImage.frame.sizE); [drawImage.image drawInRect:CGRectMake(0,self.drawImage.frame.size.width,self.drawImage.frame.size.height)]; CGContextSetLineCap(UIGraphicsGetCurrentContext(),kCGLineCapRound); CGContextSetLineWidth(UIGraphicsGetCurrentContext(),5.0); CGContextSetRGBstrokeColor(UIGraphicsGetCurrentContext(),0.0,0.5,0.6,1.0); CGContextBeginPath(UIGraphicsGetCurrentContext()); CGContextMoveToPoint(UIGraphicsGetCurrentContext(),lastPoint.x,lastPoint.y); CGContextAddLineToPoint(UIGraphicsGetCurrentContext(),currentPoint.y); CGContextstrokePath(UIGraphicsGetCurrentContext()); drawImage.image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); lastPoint = currentPoint; }
以上是大佬教程为你收集整理的iphone – 如何创建一个允许用户自由手绘的应用程序?全部内容,希望文章能够帮你解决iphone – 如何创建一个允许用户自由手绘的应用程序?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。