Thanks to visit codestin.com
Credit goes to github.com

Skip to content

linxyang/photoSelectView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

photoSelectView

一个用于发布状态界面,添加多图的collectionView选择器。

可以设置最大选择图片数量

  • 使用方法示例

#import "ViewController.h"
#import "photoSelectView.h"

@interface ViewController ()
/** 照片选择控制器 */
@property (nonatomic, strong) photoSelectView  *photoSelectVc;
@end

@implementation ViewController
- (photoSelectView *)photoSelectVc
{
    if (!_photoSelectVc) {
        _photoSelectVc = [[photoSelectView alloc] initWithFrame:self.view.bounds maxSelectCount:4  withVc:self];// 可以设置最大选择数
    }
    return _photoSelectVc;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view addSubview:self.photoSelectVc];

    self.photoSelectVc.frame = CGRectMake(0, 40, 375, 200);
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

// 在这里拿到选择后的照片
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    NSArray *images = self.photoSelectVc.images;
    
    NSLog(@"%@",images);
}

@end

image

About

一个用于发布状态界面,添加多图的collectionView选择器。

Resources

License

Stars

5 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors