- VisionSinglePhotoPicker provides a simplest way to get a SINGLE photo.
- 超方便的单张照片获取器。支持拍照/图库选择,已处理权限获取。
- Just drag
VisionControl
folder into your project - 将
VisionControl
文件夹拖入你的項目
#import "VisionSinglePhotoPicker.h"
VisionSinglePhotoPicker *picker = [[VisionSinglePhotoPicker alloc] initWithTarget:self];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {//判斷是不是Pad
//是Pad必須指定sourceView
[picker setPadPopoverSourceView:sourceView];
}
[picker show];
/*image picked
在代理方法中处理已选择图片
*/
- (void)visionSinglePhotoPicker:(VisionSinglePhotoPicker *)picker pickedImage:(UIImage *)image;
- support iPhone/iPad(You MUST set a SourceView on iPad via
- (void)setPadPopoverSourceView:(UIView *)sourceView
) - 支持iPhone/iPad(iPad必须设定SourceView:
- (void)setPadPopoverSourceView:(UIView *)sourceView
)
- iOS 8 or later. Requires ARC ,support iPhone/iPad.
- iOS 8及以上系统可使用. 本控件纯ARC,支持iPhone/iPad横竖屏
Please create a issue if you have any questions. Welcome to visit my Blog
All source code is licensed under the MIT License.