文章来源:淘论文网   发布者: 毕业设计   浏览量: 30



还可以点击去查询以下关键词:
[拍照]    [自定义]    [方式]    [相机]    [定制]    [前后]    [镜头]    [切换]    [签名]    [分享]    [自定义方式实现相机拍照定制,前后镜头切换,拍照签名和分享等]   

项目介绍:

用自定义的方式来实现相机的拍照功能,开题报告,并实现了在拍照前的签名、修改签名文字的大小、修改签名文字的颜色、前后摄像头的切换以及对拍完的照片进行分享等功能

注:该项目已获得中国开源社区推荐


功能简介:

① 用完全自定义的方式来实现相机的拍照功能;

② 实现在拍照之前可以向照片界面添加签名效果;

③ 通过Popover的方式来实现在签名前后可以对签名字体大小进行选择的功能;

④ 通过Popover的方式实现在签名前后可以对签名字体颜色进行选择的功能;

⑤ 通过拍照是否完成来控制“签名'、“字体大小”、“字体颜色”按钮是否可用功能;

⑥ 通过“相机翻转”按钮来实现前后摄像头的切换功能;

⑦ 集成ShareSDK来实现对当前所拍的带有签名的照片进行分享的功能;

⑧ 通过点击“关闭”按钮来实现自定义相机的显示和隐藏功能;

⑨ 实现对拍完照后的照片保存到相册的功能;

⑩对以上的功能进行了封装和抽取,可以单独使用,只需导入一个头文件进行控制的布局就可以了


自定义相机中的签名字体大小选择器效果图:

自定义相机中的签名字体大小选择器.gif (1.69 MB, 下载次数: 0)

下载附件  

2016-12-11 19:54 上传

自定义相机的签名字体颜色选择器效果图:

自定义相机的签名字体颜色选择器.gif (1.56 MB, 下载次数: 0)

下载附件  

签名字体颜色选择

2016-12-11 19:54 上传

自定义相机的签名效果图:

自定义相机的签名效果.gif (1.73 MB, 下载次数: 0)

下载附件  

签名

2016-12-11 19:54 上传

自定义相机的照片分享效果图:

自定义相机的照片分享.gif (1.35 MB, 下载次数: 0)

下载附件  

2016-12-11 19:54 上传

自定义相机中的前后镜头切换效果图:

自定义相机中的前后镜头切换.gif (1.62 MB, 下载次数: 0)

下载附件  

镜头切换

2016-12-11 19:55 上传

自定义相机拍照后存储相册的效果图:

自定义相机拍照后存储相册的效果.gif (1.6 MB, 下载次数: 0)

下载附件  

存储相册

2016-12-11 19:55 上传


在主控制器实现的代码:

[Objective-C] 查看源文件 复制代码

// // XGMainViewController.m // XGCustomCamera // // Created by 小果 on 2016/12/6. // Copyright © 2016年 小果. All rights reserved. // #import 'XGMainViewController.h' #import 'XGCameraController.h' @implementation XGMainViewController{ UIButton *_openCameraBtn; } - (void)viewDidLoad { [super viewDidLoad]; [self setupOpenCameraBtn]; } -(void)setupOpenCameraBtn{ _openCameraBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 200, 150)]; _openCameraBtn.center = self.view.center; [self.view addSubview:_openCameraBtn]; [_openCameraBtn setImage:[UIImage imageNamed:@'Camera'] forState:UIControlStateNormal]; [_openCameraBtn addTarget:self action:@selector(openCamera) forControlEvents:UIControlEventTouchUpInside]; } -(void)openCamera{ XGCameraController *cameraVC = [XGCameraController new]; [self presentViewController:cameraVC animated:YES completion:nil]; } @end


通过Popover的方式实现字体大小和颜色选择的相关代码:

#p#分页标题#e#

[Objective-C] 查看源文件 复制代码

-(void)xg_addChangeSignWithFontColor:(UIButton *)sender{ XGSwitchColorController *switchColor = [XGSwitchColorController new]; switchColor.xg_BgColor = ^(UIColor *cellColor){ _waterLable.textColor = cellColor; _popSwitchFontColor = cellColor; }; [self xg_setupPopViewWithAttribute:switchColor andView:sender]; } -(void)xg_changeSignatureWithFontSize:(UIButton *)sender{ XGSwitchFontSizeController *switchSize = [XGSwitchFontSizeController new]; switchSize.xg_FontSize = ^(NSInteger fontSize){ _waterLable.font = [UIFont systemFontOfSize:fontSize]; textSize = fontSize; }; [self xg_setupPopViewWithAttribute:switchSize andView:sender]; } -(void)xg_setupPopViewWithAttribute:(UIViewController *)vc andView:(UIView *)view{ vc.modalPresentationStyle = UIModalPresentationPopover; vc.preferredContentSize = CGSizeMake(60, 200); vc.popoverPresentationController.delegate = self; vc.popoverPresentationController.sourceView = view; vc.popoverPresentationController.permittedArrowDirections = UIPopoverArrowDirectionDown; CGSize size = view.bounds.size; vc.popoverPresentationController.sourceRect = CGRectMake(size.width * 0.5, -5, 0, 0); [self presentViewController:vc animated:YES completion:nil]; }


项目源码和效果图地址一:https://github.com/xiao66guo/XGCustomCamera

项目源码和效果图地址二:

论文

这里还有:


还可以点击去查询:
[拍照]    [自定义]    [方式]    [相机]    [定制]    [前后]    [镜头]    [切换]    [签名]    [分享]    [自定义方式实现相机拍照定制,前后镜头切换,拍照签名和分享等]   

请扫码加微信 微信号:sj52abcd


下载地址: http://www.taolw.com/down/8306.docx
  • 上一篇:iOS-WebVi毕业设计ew-JavaScript
  • 下一篇:BRStretchScrollHeader