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

Add possibility to change maximum zoom scale for the ScalingImageView. #48

Closed
heikkihautala opened this issue Apr 22, 2015 · 12 comments
Closed

Comments

@heikkihautala
Copy link
Contributor

No description provided.

@cdzombak
Copy link
Contributor

cdzombak commented May 1, 2015

This could easily be achieved by:

We would welcome a PR to this effect and any further discussion on the best way to expose this functionality on NYTPhotosViewController.

@heikkihautala
Copy link
Contributor Author

I made a PR: #51. I decided to go with the delegate approach, because it enables the user to set different maximum zoom scale for each photo if necessary.

@cdzombak
Copy link
Contributor

cdzombak commented May 6, 2015

@heikkihautala thanks! I'll take a look asap.

@cdzombak
Copy link
Contributor

cdzombak commented May 7, 2015

closed by #51

@cdzombak cdzombak closed this as completed May 7, 2015
@schystz
Copy link

schystz commented Aug 8, 2015

Hi. I don't get the photosViewController:maximumZoomScaleForPhoto: protocol when installing NYTPhotoViewer via Cocoapods. It installs the 0.1.2 version when specifying pod 'NYTPhotoViewer' in the Podfile.

@MichaelSelsky
Copy link
Contributor

That's because version 0.1.2 was released before this feature was added. I'll work on getting a new release on Monday. Until then you can point the most recent changes in this pod by using this line in your Podfile:

pod 'NYTPhotoViewer', :head

@agordeev
Copy link

Is this working? I have implemented photosViewController:maximumZoomScaleForPhoto:, but it never gets called.

@cdzombak
Copy link
Contributor

@andrew8712 yes, this was merged in #51 a while ago and is included in recent releases.

Is it possible you're hitting bug #95 which is fixed in v1.1.0?

@agordeev
Copy link

No, I use the latest release (1.1.0).

Should I do anything besides implementing this delegate method to achieve max zoom functionality?

@cdzombak
Copy link
Contributor

Should I do anything besides implementing this delegate method to achieve max zoom functionality?

That should be all you need.

No, I use the latest release (1.1.0).

are you using the new designated initializer? It takes a delegate and if you're using a delegate you should use this initializer:

- (instancetype)initWithPhotos:(NSArray <id <NYTPhoto>> * _Nullable)photos initialPhoto:(id <NYTPhoto> _Nullable)initialPhoto delegate:(nullable id <NYTPhotosViewControllerDelegate>)delegate

@agordeev
Copy link

Thanks, this worked. Curious, it didn't work this way:

let photosViewController = NYTPhotosViewController(photos: images, initialPhoto: item)
photosViewController.delegate = self

@cdzombak
Copy link
Contributor

Curious, it didn't work this way: …

You're running into #95 .

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

No branches or pull requests

5 participants