开发者

Signature in UIView

开发者 https://www.devze.com 2023-03-12 08:31 出处:网络
I am looking for a class that will allow the user to draw?(the main purpose is to get their signature).

I am looking for a class that will allow the user to draw?(the main purpose is to get their signature).

I checked Cocoa Controls but couldn't find such a class. Just want to now if there's any before I start writing i开发者_Go百科t myself. Thanks


Look at this tutorial: http://www.ifans.com/forums/showthread.php?t=132024

To get a JPG or PNG file, you can use the functions UIImageJPEGRepresentation or UIImagePNGRepresentation. They take a UIImage as input. And to get a UIImage from a UIView, you can use something like this.

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号