Features
========
* Presents the user with a fully customizeable view for them to sign
* Supports portrait and horizontal layout
* Returns a UIImage of the signature, optionally cropped and centered to fit
* Example shows how to save signature to a PNG file
* Code is well-documented allowing for easy customization
* Uses ARC
* Free!
Usage
=====
The code is well-documented so you should be able to tell what's going on rather quickly. There are two components: a `UIViewController` subclass that houses the protocol and handles events, and a `UIView` subclass that handles the touch events to draw the user's signature and return it as an image. You only need to work with the `UIViewController` subclass directly.
1. Add the files contained in the JBSignatureControllerSource directory to your project.
2. Design your "signature pad" background images and overwrite the default images.
3. Initialize the JBSignatureController class:
```
JBSignatureController *signatureController = [[JBSignatureController alloc] init];
signatureController.delegate = self;
[self presentModalViewController:signatureController animated:YES];
```
Note: although shown as a modal view controller here, you're not limited to that use case. You could just as easily push the view controller onto a navigation stack.
Protocol Implementation
=======================
The `JBSignatureControllerDelegate` protocol should be implemented to retrieve the signature from the controller and also to dismiss the view controller once the user has indicated that they're finished signing. The following protocol definitions are available:
Called when the user clicks the confirm button (required):<br>
`-(void)signatureConfirmed:(UIImage *)signatureImage signatureController:(JBSignatureController *)sender;`
Called when the user clicks the cancel button (optional):<br>
`-(void)signatureCancelled:(JBSignatureController *)sender;`
Called when the user clears their signature or when clearSignature is called. (optional):<br>
`-(void)signatureCleared:(UIImage *)clearedSignatureImage signatureController:(JBSignatureController *)sender;`
Example
=======
A working example is provided in the project's source.
License
=======
MIT/X11 Open Source License
Contributing
============
1. Fork it!
2. Make your changes in a new branch
3. Submit a pull request
没有合适的资源?快使用搜索试试~ 我知道了~
一个画板.zipIOS应用例子源码下载
共29个文件
m:5个
png:5个
h:4个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 171 浏览量
2022-03-06
09:56:29
上传
评论
收藏 100KB ZIP 举报
温馨提示
一个画板.zipIOS应用例子源码下载一个画板.zipIOS应用例子源码下载 1.适合学生学习研究参考 2.适合个人学习研究参考 3.适合公司开发项目技术参考
资源推荐
资源详情
资源评论
收起资源包目录
一个画板.zip (29个子文件)
一个画板
bunchjesse-JBSignatureController-b81d314
README.md 2KB
JBSignatureControllerTest
JBSignatureControllerTest.xcodeproj
project.xcworkspace
contents.xcworkspacedata 170B
xcuserdata
jessebunch.xcuserdatad
UserInterfaceState.xcuserstate 23KB
lanou3g.xcuserdatad
UserInterfaceState.xcuserstate 7KB
project.pbxproj 15KB
xcuserdata
jessebunch.xcuserdatad
xcschemes
JBSignatureControllerTest.xcscheme 3KB
xcschememanagement.plist 497B
xcdebugger
Breakpoints.xcbkptlist 91B
lanou3g.xcuserdatad
xcschemes
JBSignatureControllerTest.xcscheme 3KB
xcschememanagement.plist 497B
JBSignatureControllerTest
JBSignatureControllerTest-Prefix.pch 393B
AppDelegate.h 366B
en.lproj
InfoPlist.strings 45B
NSFileManager+DirectoryLocations.m 4KB
JBSignatureControllerTest-Info.plist 2KB
main.m 352B
NSFileManager+DirectoryLocations.h 1KB
AppDelegate.m 2KB
JSSignatureControllerSource
JBSignatureView.m 7KB
bg-signature-landscape.png 3KB
JBSignatureView.h 750B
JBSignatureController.m 6KB
JBSignatureController.h 1KB
bg-signature-portrait.png 3KB
bunchjesse-JBSignatureController-b81d314.zip 43KB
jbsignaturecontroller.png 14KB
说明.txt 189B
共 29 条
- 1
资源评论
yxkfw
- 粉丝: 76
- 资源: 2万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功