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

Allow extensibility through using a custom GalleryItem #80

Merged
merged 6 commits into from
Nov 16, 2016

Conversation

zfoltin
Copy link
Collaborator

@zfoltin zfoltin commented Nov 13, 2016

Using the .custom GalleryItem type, people will be able to use their UIImageView subclasses in the gallery

Example in the example project. Feedback is welcome

PS: hopefully helps with #56

Copy link
Owner

@Krisiacik Krisiacik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me..just minor name thing..

}

return GalleryItem.custom(fetchImageBlock: myFetchImageBlock, getViewController: getViewController)
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rename the argument name to itemViewController

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 changed it to itemViewControllerBlock

@zfoltin
Copy link
Collaborator Author

zfoltin commented Nov 13, 2016

I made ItemBaseController public so it can be inherited from

Now there is still an issue - in the example the displaced view animations don't work on this item :(

@Krisiacik
Copy link
Owner

They should work...I don't see any reason why not..did you implement the displaced Datasource?

* 'master' of https://github.com/MailOnline/ImageViewer:
  Add warning about 3.1
  Fix typo
  Cleanup README.md
  Add CHANGELOG.md
…stom

Changing a few more things to public to make GalleryItem.custom work
@zfoltin
Copy link
Collaborator Author

zfoltin commented Nov 14, 2016

It was to do with not setting the delegate and displacedViewsDatasource on GalleryItem.custom view controllers.
Also had to make a few more things public in the process but it seems to be working now. Please 👀

* 'master' of https://github.com/MailOnline/ImageViewer:
  Slight change to follow convention
  Gallery not clipped to bounds
  Remove extra empty line
  Added activity indicator to ItemBaseController
  Unnecessary white space removed
  PR suggestions followed
  Overlay view added to back of the gallery instead of the original view controller
  Fix executing launchedCompletion block
@Krisiacik
Copy link
Owner

Looks good...if it indeed works, let's merge merge merge. And win win win.

@zfoltin zfoltin merged commit 5c2364c into Krisiacik:master Nov 16, 2016
@zfoltin zfoltin mentioned this pull request Nov 16, 2016
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

Successfully merging this pull request may close these issues.

2 participants