Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/43.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iPhone签名捕获_Iphone_Digital Signature_Electronic Signature - Fatal编程技术网

iPhone签名捕获

iPhone签名捕获,iphone,digital-signature,electronic-signature,Iphone,Digital Signature,Electronic Signature,是否可以通过电缆(USB)连接将签名从iPhone传输到.xls文件?因此,这可能不是您想要的,但这就是我捕获用户(用手指/触笔)绘制的签名的方式。您的UIImageView将具有绘制的签名。我没有想过如何将签名图像传输到.xls,但您可以将图像保存到设备的照片库中,然后像导出任何其他图像一样将其导出,然后将其放入.xls(我知道,这是一个手动过程)。我希望这有帮助 签名EWController.h IBOutlet UIImageView *signatureImageView; //Sig

是否可以通过电缆(USB)连接将签名从iPhone传输到.xls文件?

因此,这可能不是您想要的,但这就是我捕获用户(用手指/触笔)绘制的签名的方式。您的UIImageView将具有绘制的签名。我没有想过如何将签名图像传输到.xls,但您可以将图像保存到设备的照片库中,然后像导出任何其他图像一样将其导出,然后将其放入.xls(我知道,这是一个手动过程)。我希望这有帮助

签名EWController.h

IBOutlet UIImageView *signatureImageView;

//Signature Drawing Items
CGPoint lastPoint;
BOOL mouseSwiped;   
int mouseMoved;
SignatureCaptureViewController.m

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {      
    mouseSwiped = NO;
    UITouch *touch = [touches anyObject];

    //Clear Signature on Double Tap
    if ([touch tapCount] == 2) {
        signatureImageView.image = nil;
        return;
    }

    lastPoint = [touch locationInView:signatureImageView];

}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
    mouseSwiped = YES;

    UITouch *touch = [touches anyObject];   

    CGPoint currentPoint = [touch locationInView:signatureImageView];

    UIGraphicsBeginImageContext(signatureImageView.frame.size);
    [signatureImageView.image drawInRect:CGRectMake(0, 0, signatureImageView.frame.size.width, signatureImageView.frame.size.height)];
    CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);
    CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 2.0);
    CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), 0.0, 0.0, 0.0, 1.0);
    CGContextBeginPath(UIGraphicsGetCurrentContext());
    CGContextMoveToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y);
    CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), currentPoint.x, currentPoint.y);
    CGContextStrokePath(UIGraphicsGetCurrentContext());

    signatureImageView.image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();

    lastPoint = currentPoint;
}

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {

    UITouch *touch = [touches anyObject];

    //Clear Signature on Double Tap
    if ([touch tapCount] == 2) {
        signatureImageView.image = nil;
        return;
    }

    if(!mouseSwiped) {
        UIGraphicsBeginImageContext(signatureImageView.frame.size);
        [signatureImageView.image drawInRect:CGRectMake(0, 0, signatureImageView.frame.size.width, signatureImageView.frame.size.height)];
        CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);
        CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 2.0);
        CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), 0.0, 0.0, 0.0, 0.0);
        CGContextMoveToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y);
        CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y);
        CGContextStrokePath(UIGraphicsGetCurrentContext());
        CGContextFlush(UIGraphicsGetCurrentContext());
        signatureImageView.image = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();
    }
}

来自应用程序(如autogragh)的签名。e、 g.客户签收货物。您是在寻找捕获签名的方法,还是只想通过标准附件端口/USB将其从应用程序导出到Excel?这两种方法都是真的,因为我只能找到通过网络(无线)传输签名的应用程序,我想把这个信号导入笔记本电脑的xls文件中,这看起来很棒。我很想看到完整的.h,以及更多关于如何通过interface builder实际集成的内容。