12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- //
- // LYLPhotoTailoringTool.h
- // PhotoTailoring
- //
- // Created by Rainy on 2018/8/22.
- // Copyright © 2018年 Rainy. All rights reserved.
- //
- #define WS(weakSelf) __weak __typeof(&*self)weakSelf = self;
- #import <Foundation/Foundation.h>
- #import <UIKit/UIKit.h>
- typedef void(^ShowImageBlock)(NSString *imageUrlStr);
- typedef void(^ChoosImageBlock)(UIImage *image);
- typedef enum SelectPhotoWithTypePhoroOrCamera {
- SelectPhotoWithTypePhoroOrCamera1 = 1, // Photo
- SelectPhotoWithTypePhoroOrCamera2 = 2, // Camera
- }SelectPhotoWithTypePhoroOrCamera;
- @interface LYLPhotoTailoringTool : NSObject
- + (instancetype)sharedTool;
- /**
- * 选择相册/拍摄
- */
- - (void)photoTailoringAndShowImg:(NSString *)imgUrl showImgBlock:(ShowImageBlock)showImgBlock choosImgBlock:(ChoosImageBlock)choosImgBlock;
- /**
- * 选择相册/拍摄 是否裁剪 上面方法默认裁剪
- */
- - (void)photoTailoringAndShowImg:(NSString *)imgUrl crop:(BOOL)crop showImgBlock:(ShowImageBlock)showImgBlock choosImgBlock:(ChoosImageBlock)choosImgBlock ;
- /**
- * 选择图片
- */
- - (void)chooseImage:(ChoosImageBlock)choosImgBlock;
- //已有选择器
- - (void)selectPhotoWithPhoroOrCamera:(SelectPhotoWithTypePhoroOrCamera)type crop:(BOOL)crop showImgBlock:(ShowImageBlock)showImgBlock choosImgBlock:(ChoosImageBlock)choosImgBlock;
- //直接打开相册
- - (void)openPhoroWithCrop:(BOOL)crop showImgBlock:(ShowImageBlock)showImgBlock choosImgBlock:(ChoosImageBlock)choosImgBlock;
- //直接打开相机
- - (void)openCameraWithCrop:(BOOL)crop showImgBlock:(ShowImageBlock)showImgBlock choosImgBlock:(ChoosImageBlock)choosImgBlock;
- @end
|