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

Implements animated GIF support #71

Merged
merged 17 commits into from
Dec 4, 2015

Conversation

kimar
Copy link
Contributor

@kimar kimar commented Sep 14, 2015

Hey guys, I've invested some time adding animated GIF support, as this topic is more than trivial I expect this PR to get lively and thing be subject to change.

Demo Video

There is one change which requires the user to add one more property to his NYTPhoto conform object, namely imageData. This property can be used together with image to specify an image to be shown. Other than image it does not hold an UIImage but a NSData representation of the image. This is important for FLAnimatedImage to recognize the GIF correctly and display it.

I’ve added two subspecs to the Podspec:

  • Core: This is the NYTPhotoViewer without animated GIF support (thus also not requiring FLAnimatedImage)
  • AnimatedGifSupport: This is NYTPhotoViewer which depending on FLAnimatedImage for animated GIF support.

By default (e.g. when just using pod ‘NYTPhotoViewer’) the Core subspec is used.

I hop we can start working on this PR, I’d be pleased to get some early feedback so we can get things clean. Looking forward to it.

Cheers,
Marcus

@cdzombak cdzombak self-assigned this Sep 15, 2015
Marcus Kida added 3 commits September 21, 2015 13:26
Conflicts:
	Example/NYTPhotoViewer.xcodeproj/project.pbxproj
	Pod/Classes/ios/NYTPhotoViewController.m
	Pod/Classes/ios/NYTPhotosViewController.m
	Pod/Classes/ios/NYTScalingImageView.m
@cdzombak cdzombak assigned dzlobin and unassigned cdzombak Oct 20, 2015
Conflicts:
	Example/NYTPhotoViewer.xcodeproj/project.pbxproj
	Example/Podfile
	Example/Podfile.lock
	Example/Pods/Local Podspecs/NYTPhotoViewer.podspec.json
	Example/Pods/Manifest.lock
	Example/Pods/Pods.xcodeproj/project.pbxproj
	Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/NYTPhotoViewer.xcscheme
	Example/Pods/Target Support Files/FLAnimatedImage/FLAnimatedImage-prefix.pch
	Example/Pods/Target Support Files/NYTPhotoViewer/NYTPhotoViewer-Private.xcconfig
	Example/Pods/Target Support Files/NYTPhotoViewer/NYTPhotoViewer-prefix.pch
	Example/Pods/Target Support Files/NYTPhotoViewer/NYTPhotoViewer.xcconfig
	Example/Pods/Target Support Files/OCMock/OCMock-Private.xcconfig
	Example/Pods/Target Support Files/OCMock/OCMock-prefix.pch
	Example/Pods/Target Support Files/Pods-NYTPhotoViewer-Swift/Pods-NYTPhotoViewer-Swift-resources.sh
	Example/Pods/Target Support Files/Pods-NYTPhotoViewer-Swift/Pods-NYTPhotoViewer-Swift.debug.xcconfig
	Example/Pods/Target Support Files/Pods-NYTPhotoViewer-Swift/Pods-NYTPhotoViewer-Swift.release.xcconfig
	Example/Pods/Target Support Files/Pods-NYTPhotoViewer-SwiftTests/Pods-NYTPhotoViewer-SwiftTests-resources.sh
	Example/Pods/Target Support Files/Pods-NYTPhotoViewer-SwiftTests/Pods-NYTPhotoViewer-SwiftTests.debug.xcconfig
	Example/Pods/Target Support Files/Pods-NYTPhotoViewer-SwiftTests/Pods-NYTPhotoViewer-SwiftTests.release.xcconfig
	Example/Pods/Target Support Files/Pods-NYTPhotoViewer/Pods-NYTPhotoViewer-resources.sh
	Example/Pods/Target Support Files/Pods-NYTPhotoViewer/Pods-NYTPhotoViewer.debug.xcconfig
	Example/Pods/Target Support Files/Pods-NYTPhotoViewer/Pods-NYTPhotoViewer.release.xcconfig
	Example/Pods/Target Support Files/Pods-Tests-NYTPhotoViewer/Pods-Tests-NYTPhotoViewer-prefix.pch
	Example/Pods/Target Support Files/Pods-Tests-OCMock/Pods-Tests-OCMock-prefix.pch
	Example/Pods/Target Support Files/Pods-Tests/Pods-Tests-resources.sh
	Example/Pods/Target Support Files/Pods-Tests/Pods-Tests.debug.xcconfig
	Example/Pods/Target Support Files/Pods-Tests/Pods-Tests.release.xcconfig
	Example/Tests/NYTPhotosViewControllerTests.m
	NYTPhotoViewer.podspec
	Pod/Classes/ios/NYTPhotosViewController.m
Merging in develop, so we can get the GIF support PR merged in the base repo.
@kimar kimar force-pushed the feature/animated-gif-support branch from 7babc82 to de81f65 Compare December 1, 2015 21:29
Marcus Kida and others added 2 commits December 2, 2015 08:43
@@ -42,6 +42,7 @@ - (void)testSingleTapGestureRecognizerHasAssociatedViewAfterViewDidLoad {

- (void)testPageViewControllerExistsAfterInitialization {
NYTPhotosViewController *photosViewController = [[NYTPhotosViewController alloc] initWithPhotos:[self newTestPhotos]];
[photosViewController viewDidLoad];
Copy link
Contributor

Choose a reason for hiding this comment

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

[Minor] Would you mind dropping a newline between these last two lines?

@dzlobin
Copy link
Contributor

dzlobin commented Dec 4, 2015

@kimar I'll actually address those minor changes in a separate PR; this is good to go.

dzlobin added a commit that referenced this pull request Dec 4, 2015
@dzlobin dzlobin merged commit 7ec2820 into nytimes:develop Dec 4, 2015
kimar pushed a commit to atlassian/NYTPhotoViewer that referenced this pull request Dec 6, 2015
@kimar kimar mentioned this pull request Dec 6, 2015
@kimar
Copy link
Contributor Author

kimar commented Dec 6, 2015

@dzlobin opened a PR for the points mentioned above #97
Give me a heads up in case you need anything else 👍
And thx btw for this awesome piece of open source software 😄

Twigz added a commit that referenced this pull request Jan 4, 2016
@Zulqarnayn
Copy link

How can I load gif in NYTPhotoViewer? Is there any documentation?

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.

None yet

4 participants