-
Notifications
You must be signed in to change notification settings - Fork 142
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
Comments
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. |
+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
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 presentedSimpleImageViewer
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.
The text was updated successfully, but these errors were encountered: