在UIView中签名

我在找一个可以让用户画画的类(主要目的是得到他们的签名)。

我检查了cocoa控制,但无法find这样一个类。 只是想现在如果有什么之前我自己开始写。 谢谢

看看这个教程: http : //www.ifans.com/forums/showthread.php? t= 132024

要获得JPG或PNG文件,您可以使用函数UIImageJPEGRepresentationUIImagePNGRepresentation 。 他们把UIImage作为input。 而从UIView获得UIImage ,你可以使用这样的东西。

 UIGraphicsBeginImageContext(view.frame.size); [view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();