diff --git a/QBImagePicker/QBAssetCell.h b/QBImagePicker/QBAssetCell.h index cd2f4beb..cb8c89b0 100644 --- a/QBImagePicker/QBAssetCell.h +++ b/QBImagePicker/QBAssetCell.h @@ -16,5 +16,6 @@ @property (weak, nonatomic) IBOutlet QBVideoIndicatorView *videoIndicatorView; @property (nonatomic, assign) BOOL showsOverlayViewWhenSelected; +@property (nonatomic) UIColor* checkmarkColor; @end diff --git a/QBImagePicker/QBAssetCell.m b/QBImagePicker/QBAssetCell.m index c62c5626..30d98600 100644 --- a/QBImagePicker/QBAssetCell.m +++ b/QBImagePicker/QBAssetCell.m @@ -7,10 +7,12 @@ // #import "QBAssetCell.h" +#import "QBCheckmarkView.h" @interface QBAssetCell () @property (weak, nonatomic) IBOutlet UIView *overlayView; +@property (weak, nonatomic) IBOutlet QBCheckmarkView *checkmarkView; @end @@ -24,4 +26,10 @@ - (void)setSelected:(BOOL)selected self.overlayView.hidden = !(selected && self.showsOverlayViewWhenSelected); } +-(void)setCheckmarkColor:(UIColor *)checkmarkColor +{ + _checkmarkColor = checkmarkColor; + self.checkmarkView.bodyColor = checkmarkColor; +} + @end diff --git a/QBImagePicker/QBAssetsViewController.m b/QBImagePicker/QBAssetsViewController.m index 37381715..b1082771 100644 --- a/QBImagePicker/QBAssetsViewController.m +++ b/QBImagePicker/QBAssetsViewController.m @@ -443,6 +443,7 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cell QBAssetCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"AssetCell" forIndexPath:indexPath]; cell.tag = indexPath.item; cell.showsOverlayViewWhenSelected = self.imagePickerController.allowsMultipleSelection; + cell.checkmarkColor = self.imagePickerController.checkmarkColor; // Image PHAsset *asset = self.fetchResult[indexPath.item]; diff --git a/QBImagePicker/QBImagePicker.storyboard b/QBImagePicker/QBImagePicker.storyboard index cba77d90..71295ce4 100644 --- a/QBImagePicker/QBImagePicker.storyboard +++ b/QBImagePicker/QBImagePicker.storyboard @@ -1,7 +1,8 @@ - + - + + @@ -226,6 +227,7 @@ + diff --git a/QBImagePicker/QBImagePickerController.h b/QBImagePicker/QBImagePickerController.h index e7547e59..c34a4ed6 100644 --- a/QBImagePicker/QBImagePickerController.h +++ b/QBImagePicker/QBImagePickerController.h @@ -45,6 +45,8 @@ typedef NS_ENUM(NSUInteger, QBImagePickerMediaType) { @property (nonatomic, copy) NSString *prompt; @property (nonatomic, assign) BOOL showsNumberOfSelectedAssets; +@property (nonatomic, copy) UIColor *checkmarkColor; + @property (nonatomic, assign) NSUInteger numberOfColumnsInPortrait; @property (nonatomic, assign) NSUInteger numberOfColumnsInLandscape;