Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CTAssetsPickerController/CTAssetCollectionViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,12 @@ - (void)updateTitle:(NSArray *)selectedAssets
- (void)updateButton:(NSArray *)selectedAssets
{
self.navigationItem.leftBarButtonItem = (self.picker.showsCancelButton) ? self.cancelButton : nil;
self.navigationItem.rightBarButtonItem = [self isTopViewController] ? self.doneButton : nil;
self.navigationItem.rightBarButtonItem = [self isTopViewController] ? self.doneButton : self.picker.rightBarItemForAlbumsController;

if (self.picker.alwaysEnableDoneButton)
self.navigationItem.rightBarButtonItem.enabled = YES;
else
self.navigationItem.rightBarButtonItem.enabled = (self.picker.selectedAssets.count > 0);
self.navigationItem.rightBarButtonItem.enabled = (self.picker.selectedAssets.count > 0) || ![self isTopViewController];
}

- (BOOL)isTopViewController
Expand Down
7 changes: 7 additions & 0 deletions CTAssetsPickerController/CTAssetsPickerController.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (nonatomic, copy) NSString *doneButtonTitle;

/**
* A right bar button item for album controller
*
* It can be usefull to add the item button with camera style for example.
*/
@property (nonatomic, strong) UIBarButtonItem *rightBarItemForAlbumsController;

/**
* Determines whether or not the cancel button is visible in the picker.
*
Expand Down