iphone – 如何创建一个允许用户自由手绘的应用程序?

iphone – 如何创建一个允许用户自由手绘的应用程序?,第1张

概述我是iPad应用程序开发的新手. 我有任务开发像iDesk应用程序的应用程序,我不知道如何从应用程序开始. 这个应用程序有1.徒手绘图2.形状识别&更多功能.但我不知道如何从这个应用程序开始. 请帮帮我. 提供有关如何创建此应用程序的一些详细信息.我认为这个应用程序是从openGL创建的.如果可能,请提供一些样品. 请帮帮我. 我已经发布了有关此主题的新问题New Question for thi 我是iPad应用程序开发的新手.

我有任务开发像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 – 如何创建一个允许用户自由手绘的应用程序?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1086031.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-27
下一篇 2022-05-27

发表评论

登录后才能评论

评论列表(0条)

保存