HTML5   发布时间:2022-04-27  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了iphone – 如何创建一个允许用户自由手绘的应用程序?大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我是iPad应用程序开发的新手.

我有任务开发像iDesk应用程序的应用程序,我不知道如何从应用程序开始.

这个应用程序有1.徒手绘图2.形状识别&更多功能.但我不知道如何从这个应用程序开始.
请帮帮我.

提供有关如何创建此应用程序的一些详细信息.我认为这个应用程序是从openGL创建的.如果可能,请提供一些样品.

请帮帮我.

我已经发布了有关此主题的新问题New Question for this topic

请帮我解决一下这个.

解决方法@H_301_24@
使用以下我之前使用过的.它肯定会起作用: –

- (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,请注明来意。