LLSimpleCamera V8HorizontalPickerView

LLSimpleCamera是一款简单实用的可以自定义相机的控件,也支持闪光灯。可以自定义相关的按钮进行自己的想进行的操作
//创建
self.camera = [[LLSimpleCamera alloc] initWithQuality:CameraQualityPhoto];
// attach to the view and assign a delegate
[self.camera attachToViewController:self withDelegate:self];
CGFloat cameraW = [[UIScreen mainScreen] bounds].size.width;
CGFloat cameraH = [[UIScreen mainScreen] bounds].size.height - 94;
//设尺寸
self.camera.view.frame = CGRectMake(0, 0, cameraW, cameraH);
//是否允许在视图意外看
self.camera.fixOrientationAfterCapture = NO;
//判断摄像头访问权限
NSString * mediaType = AVMediaTypeVideo;
AVAuthorizationStatus authorizationStatus = [AVCaptureDevice authorizationStatusForMediaType:mediaType];
if (authorizationStatus == AVAuthorizationStatusRestricted|| authorizationStatus == AVAuthorizationStatusDenied) {
UIAlertView * alertView = [[UIAlertView alloc]initWithTitle:@”无法访问相机” message:@”请在【设置->隐私->相机】下允许访问相机” delegate:self cancelButtonTitle:@”确定” otherButtonTitles:nil, nil];
[alertView show];

V8HorizontalPickerView视图选择器:
self.pickerView.delegate = self;
self.pickerData = [NSArray arrayWithObjects:@”二维码”,@”身份证”,@”护照”, nil];
self.pickerView = [[V8HorizontalPickerView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 20) withDataSource:_pickerData];
self.pickerView.backgroundColor = [UIColor clearColor];
self.pickerView.selectedTextColor = [UIColor whiteColor];//147 198 228
self.pickerView.textColor = [UIColor colorWithRed:147/255.f green:198/255.f blue:228/255.f alpha:1];
self.pickerView.selectionPoint = CGPointMake(self.pickerView.frame.size.width/2, 0);

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值