Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
indulgeIn committed Dec 27, 2018
2 parents 0418b49 + 8f4b579 commit a10e7e5
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions README.md
@@ -1,4 +1,4 @@
# YBImageBrowser ( Latest version : 2.0.9 )
# YBImageBrowser ( Latest version : 2.1.0 )

<center>
<img src="https://github.com/indulgeIn/YBImageBrowser/blob/master/OtherDocuments/ybib_st_use.gif">
Expand Down Expand Up @@ -144,11 +144,6 @@ browser.currentIndex = index;
数据模型若设置了 `sourceObject`,并且 `sourceObject``UIImageView` 类型的,那么组件会自动将该图片作为 `thumbImage`,所以这种情况不需要另外设置缩略图了。


### 关于预加载

`YBImageBrowseCellData``YBVideoBrowseCellData` 都有一个方法 `-preload` ,顾名思义就是预加载,若你设置图片或视频过后调用了该方法,会预先处理数据并且缓存下来,否则,数据会在界面展示的时候处理。这是一个对用户体验的优化,可以让用户更流畅的浏览内容,但该方法会增加 CPU 的负担(虽然基本是异步执行的),所以若数据模型过多慎用该方法。


### 图片处理的一些配置

当一张图片过大,组件会自动压缩显示,并且在放大的时候裁剪显示,这个纹理尺寸的临界值可以通过 `YBImageBrowseCellData``globalMaxTextureSize` 属性设置。
Expand Down Expand Up @@ -317,11 +312,6 @@ However, having a large amount of data in a image browser will increase the burd
If the `sourceObject` is set in the data model and `sourceObject` is kind of `UIImageView` , the component will set the image as a `thumbImage` automatically, so there is no need to set up another thumbnail image in this case.


### About preloading

Both `YBImageBrowseCellData` and `YBVideoBrowseCellData` have a method `-preload`. If you call this method after setting up a picture or video, the data will be pre-processed and cached, otherwise, the data will be processed when the interface is displayed. This is an optimization of the user experience that allows users to browse content more smoothly, but this approach increases the CPU burden (albeit executed asynchronously) , so use this approach cautiously if the data model is too much.


### Some image configuration

When an image is too large, the component will compress to display automatically, and clip to display when enlarged, the critical value of the texture size can be set by the `globalMaxTextureSize` property of `YBImageBrowseCellData`.
Expand Down

0 comments on commit a10e7e5

Please sign in to comment.