[英]Nimbus NIToolbarPhotoViewController Image Crisping Effect
I'm using Nimbus to display a photo album with scrubber and zoomable image view. 我正在使用Nimbus来显示带有洗涤器和可缩放图像视图的相册。 I use network images, and display a thumbnail until the final image is loaded.
我使用网络图像,并显示缩略图,直到加载最终图像。
NIPhotoAlbumScrollView
provides the method didLoadPhoto:atIndex:photoSize:
to accomplish exactly that. NIPhotoAlbumScrollView
提供了didLoadPhoto:atIndex:photoSize:
来完成该任务。
From the source code comments , the NIPhotoScrollView
should support that "image crisping effect" - showing thumbnail and when full-size image is loaded, sharpen the image without loosing the zoom state. 从源代码注释中 ,
NIPhotoScrollView
应该支持该“图像NIPhotoScrollView
效果”-显示缩略图,并且在加载全尺寸图像时,在不失去缩放状态的情况下锐化图像。
This feature seems broken though. 但是,此功能似乎已损坏。 When the thumbnail is loaded, it is displayed in its 1:1 pixel size, which is very small on screen.
加载缩略图后,缩略图以1:1像素大小显示,在屏幕上很小。 When the full-size image is loaded, it is also loaded in its 1:1 pixel size (if smaller than the available view size), which makes the image visually jump bigger .
加载完整尺寸的图像时,还会以1:1像素大小(如果小于可用的视图尺寸)加载图像 ,这会使图像在视觉上跳得更大 。
Any idea on how to fix that issue? 关于如何解决该问题的任何想法吗?
Note that I tried both with a full sized image with dimensions bigger or smaller than the size of the NIToolbarPhotoViewController
on screen. 请注意,我都尝试了全尺寸图像,尺寸大于或小于屏幕上
NIToolbarPhotoViewController
的尺寸。
you may already be doing this, but one thing to make certain: 您可能已经在执行此操作,但是请确保以下几点:
where you implement photoAlbumScrollView:photoAtIndex:photoSize:isLoading:originalPhotoDimensions:
for protocol NIPhotoAlbumScrollViewDataSource
, you must do the following, as mentioned in these comments in the source : 在协议
NIPhotoAlbumScrollViewDataSource
实现photoAlbumScrollView:photoAtIndex:photoSize:isLoading:originalPhotoDimensions:
的NIPhotoAlbumScrollViewDataSource
,必须执行以下操作,如源代码中的这些注释所述 :
* If you have a thumbnail in memory but not the full-size image yet, then you should return
* the thumbnail, set isLoading to YES, and set photoSize to NIPhotoScrollViewPhotoSizeThumbnail.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.