This commit is contained in:
lianxiang
2018-09-23 01:30:29 +08:00
parent db1740e72b
commit 3508cab25e
80 changed files with 3687 additions and 127 deletions
+17
View File
@@ -0,0 +1,17 @@
//
// SJAlbumModel.h
// SJPhotoPickerDemo
//
// Created by Jaesun on 16/8/22.
// Copyright © 2016年 S.J. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <Photos/Photos.h>
@interface SJAlbumModel : NSObject
@property (nonatomic, strong) PHFetchResult *assetResult;
@property (nonatomic, strong) NSString *title;
@end
+13
View File
@@ -0,0 +1,13 @@
//
// SJAlbumModel.m
// SJPhotoPickerDemo
//
// Created by Jaesun on 16/8/22.
// Copyright © 2016年 S.J. All rights reserved.
//
#import "SJAlbumModel.h"
@implementation SJAlbumModel
@end
+36
View File
@@ -0,0 +1,36 @@
//
// SJPhotoModel.h
// SJPhotoPickerDemo
//
// Created by Jaesun on 16/8/19.
// Copyright © 2016年 S.J. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <Photos/Photos.h>
@interface SJPhotoModel : NSObject <NSCopying>
/**
* 图片资源
*/
@property (nonatomic, strong) PHAsset *asset;
/**
* 选中的次序起始值为1 , 0表示没被选中
*/
@property (nonatomic, assign) NSInteger pickedIndex;
/**
* 在相册中次序起始值为 0
*/
@property (nonatomic, assign) NSInteger inAlbumIndex;
/**
* 是否选中 YES——选择 NO——取消选择
*/
@property (nonatomic, assign) BOOL isPicked;
@end
+25
View File
@@ -0,0 +1,25 @@
//
// SJPhotoModel.m
// SJPhotoPickerDemo
//
// Created by Jaesun on 16/8/19.
// Copyright © 2016年 S.J. All rights reserved.
//
#import "SJPhotoModel.h"
@implementation SJPhotoModel
-(id)copyWithZone:(NSZone *)zone {
SJPhotoModel *modelCopy = [[[self class] allocWithZone:zone] init];
modelCopy.asset = self.asset;
modelCopy.pickedIndex = self.pickedIndex;
modelCopy.inAlbumIndex = self.inAlbumIndex;
return modelCopy;
}
@end