CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

LTxCamera 0.0.7

LTxCamera 0.0.7

Maintained by liangtong.



LTxCamera 0.0.7

  • By
  • liangtong

LTxCamera

  • 相册
  • 拍照
  • 小视频
  • 扫码

Installation with CocoaPods

LTxCamera is available in CocoaPods, specify it in your Podfile:

   pod 'LTxCamera'

Deployment

9.0

Demo

Ablum

Usage

相片选择,设置最多选择数量

    LTxCameraAblumViewController* ablumVC = [[LTxCameraAblumViewController alloc] init];
    ablumVC.photoPickerDelegate = self;
    ablumVC.maxImagesCount  =  9;
    dispatch_async(dispatch_get_main_queue(), ^{
        [self presentViewController:ablumVC animated:YES completion:nil];
    });

回调包含图片、文件地址

-(void)ltxCamera_photoPickerDidFinishPickingPhotos:(NSArray<UIImage *> *)photos paths:(NSArray<NSString*>*)paths sourceAssets:(NSArray *)assets{
    
}

Camera

Usage

仿微信的拍照/拍摄,设置小视频的格式、最长时间(秒)

    LTxCameraShootViewController* cameraShootVC = [[LTxCameraShootViewController alloc] init];
    cameraShootVC.allowTakePhoto = YES;
    cameraShootVC.allowRecordVideo = YES;
    cameraShootVC.maxRecordDuration = 15;
    cameraShootVC.shootDoneCallback = ^(UIImage* image, NSURL* videoPath, PHAsset *asset){
            
    };
    dispatch_async(dispatch_get_main_queue(), ^{
        [self presentViewController:cameraShootVC animated:NO completion:nil];
    });  

Qrcode

Usage

二维码扫描,自动感应设备光线提示开灯。支持自定义边框颜色,扫描动画图片; 亦可继承该Controller,重写「scanCompleteWithQRCode:」方法。

    LTxCameraScanViewController* scanVC = [[LTxCameraScanViewController alloc] init];
    scanVC.scanAnimateImage = [UIImage imageNamed:@"QRCodeScanningLineGrid"];
    scanVC.scanAnimateImageHeight = 100.f;
    scanVC.scanCallback = ^(NSString *qrcode) {
        NSLog(@"qrcode : %@",qrcode);
    };
    [self.navigationController pushViewController:scanVC animated:NO];

二维码生成,颜色可定制

    [LTxQRCodeGenerate fillQRImageWithImageView:_imageView qrString:@"Hello world!"];

Contacts

[email protected]

License

MIT License

Copyright (c) 2017 liangtong

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.