johnil / JFImagePickerController

高性能多选图片库
MIT License
587 stars 77 forks source link

可设置可选图片数量上限 #4

Open zld opened 9 years ago

zld commented 9 years ago

可能不止用于9图模式,比如想在修改头像的时候也用这个,就只需要上限为1。 使用方式如下:

- (void)preview:(UITapGestureRecognizer *)tap{
    UIView *temp = tap.view;
    JFImagePickerController *picker = [[JFImagePickerController alloc] initWithPreviewIndex:temp.tag];
    picker.maxImagesCount = 1;
    picker.pickerDelegate = self;
    [self presentViewController:picker animated:YES completion:nil];
}

- (void)pickPhotos{
    JFImagePickerController *picker = [[JFImagePickerController alloc] initWithRootViewController:nil];
    picker.maxImagesCount = 1;
    picker.pickerDelegate = self;
    [self presentViewController:picker animated:YES completion:nil];
}
bawn commented 9 years ago

作者貌似最近很忙啊,一直都没空看

johnil commented 9 years ago

抱歉- -最近确实有点忙。之后会更新,且更好用 :D