Skip to content

Enable doneButton by default #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2016
Merged
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
2 changes: 2 additions & 0 deletions BFRImageViewController/BFRImageViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

/*! When peeking, iOS already hides the status bar for you. In that case, leave this to the default value of NO. If you are using this class outside of 3D touch, set this to YES. */
@property (nonatomic, getter=shouldHideStatusBar) BOOL hideStatusBar;

/*! Flag property that lets disable the doneButton. Default to YES */
@property (nonatomic) BOOL enableDoneButton;

@end
1 change: 1 addition & 0 deletions BFRImageViewController/BFRImageViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ - (instancetype)initWithImageSource:(NSArray *)images {
NSAssert(images.count > 0, @"You must supply at least one image source to use this class.");
self.images = images;
self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
self.enableDoneButton = YES;
}

return self;
Expand Down
3 changes: 1 addition & 2 deletions BFRImageViewerDemo/BFRImageViewer/FirstViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ - (void)viewDidLoad {

- (void)openImage {
//Here, the image source could be an array containing/a mix of URL strings, NSURLs, PHAssets, or UIImages
BFRImageViewController *imageVC = [[BFRImageViewController alloc] initWithImageSource:@[self.imgURL]];
imageVC.enableDoneButton = YES;
BFRImageViewController *imageVC = [[BFRImageViewController alloc] initWithImageSource:@[self.imgURL]];
[self presentViewController:imageVC animated:YES completion:nil];
}

Expand Down