XBImageBrowser 0.0.2

XBImageBrowser 0.0.2

‘_QianYe’ 管理。



 
依赖关系
Masonry>= 0
XBImageManager>= 0
 

  • 谢贤彬

XBImageBrowser

图片浏览器,支持本地图片和网络图片(支持混合搭配,虽说不那么有用)

安装

pod 'XBImageBrowser'


### 效果图:

image

特别说明:

如果需要旋转屏幕,必须满足以下两个条件

1.imageBrowser是通过present出现的

2.如果应用不支持屏幕旋转,则AppDelegate必须实现以下方法:

-(UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {

    return UIInterfaceOrientationMaskAll;
}

使用:


XBImageBrowser_smanos *browser=[XBImageBrowser_smanos new];

//设置数据源数组,可以是网络的也可以是本地的
browser.arr_imagePathOrUrlstr=[@[@"https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo/bd_logo1_31bdc765.png",[[NSBundle mainBundle] pathForResource:@"AW1C_product01.png" ofType:nil],[[NSBundle mainBundle] pathForResource:@"AW1C_product02.png" ofType:nil],[[NSBundle mainBundle] pathForResource:@"AW1C_product03.png" ofType:nil],[[NSBundle mainBundle] pathForResource:@"AW1C_product04.png" ofType:nil],[[NSBundle mainBundle] pathForResource:@"AW1C_settingwifi.png" ofType:nil]] mutableCopy];

//进入时展示第几张(从0开始)
browser.indexOfItem=1;

[self presentViewController:browser animated:YES completion:nil];