简体   繁体   English

对于NimbusKit,NIToolbarPhotoViewController可以设置缩放比例

[英]For NimbusKit NIToolbarPhotoViewController is there a way to set zoom scale

I'm using NIToolbarPhotoViewController by subclassing it. 我通过子类化使用NIToolbarPhotoViewController。 So far everything is working, but i can not change max zoom scale like you can with scroll views. 到目前为止,一切正常,但是我无法像滚动视图一样更改最大缩放比例。 I'm set 我定了

photoAlbumView.zoomingAboveOriginalSizeIsEnabled = YES 

and

photoAlbumView.pagingScrollView.maximumZoomScale = 100 photoAlbumView.pagingScrollView.maximumZoomScale = 100

But that didn't seen to do anything. 但这没什么用。 It's still using the default zoom factor i think it's around 2, any ideas? 它仍然使用默认的缩放系数,我认为大约是2,有什么想法吗?

Try setting maximumScale to 100 on the returned view in the pageViewForIndex data source method. 尝试在pageViewForIndex数据源方法中将返回的视图上的maximumScale设置为100。

The problem you're seeing is that the maximumScale is set on the individual photo view. 您看到的问题是在单个照片视图上设置了maximumScale。 The paging scroll view is simply what contains and manages the multiple pages of photos. 分页滚动视图只是包含和管理多页照片的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM