Skip to content
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

Opinion: Add Feature to Library or Allow Subclassing #43

Open
jeffreybergier opened this issue Oct 29, 2018 · 2 comments
Open

Opinion: Add Feature to Library or Allow Subclassing #43

jeffreybergier opened this issue Oct 29, 2018 · 2 comments

Comments

@jeffreybergier
Copy link

jeffreybergier commented Oct 29, 2018

Expected behavior

I'd like the ability to get a callback, either through a closure or a delegate method when the user requests to close the view controller. This better matches Apple's own API's (e.g. UIImagePickerControllerDelegate) and allows the code that presented SimpleImageViewer to also be in charge of dismissing it.

Actual behavior

Currently, there is no way to control this. SimpleImageViewer dismisses itself when the X button is tapped by the user.

Discussion

I wanted to know as the library maintainer whether you would like a feature like this added to the library or whether you would be OK with making small changes to SimpleImageViewer to make it subclassable.

Right now, I've modified it to make it subclassable to add this feature. I really want to submit a pull request for either solution you prefer (hopefully you like one of them 😇). But I wanted to get the opinion of someone that maintains the project before blindly submitting a PR 😀.

Thanks

And a big thanks for the library. Small UI's like this are so helpful to iOS development where even such a "simple" task as showing an image full screen can take so long when doing them from scratch.

@jeffreybergier
Copy link
Author

jeffreybergier commented Oct 29, 2018

I should add that this appears to be similar to issue #9 but with a slight twist due to the question on the alternate way to add features like this, with subclassing.

@guillianbalisi
Copy link

+1 to this, would be great if I could subclass the ImageViewerController to override things like viewDidLoad and viewWillAppear for my needs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants