美文网首页
iOS 图片浏览器 SDPhotoBrowser 的使用

iOS 图片浏览器 SDPhotoBrowser 的使用

作者: iOS门三闫 | 来源:发表于2019-07-17 16:46 被阅读0次

#import "SDPhotoBrowser.h"

@interface YjxCustomTableViewCell ()<SDPhotoBrowserDelegate>

@end

SDPhotoBrowser * broser =[[SDPhotoBrowser alloc] init];

 broser.currentImageIndex = indexPath.row-1;

 broser.sourceImagesContainerView = view;//这里必须是图片所存放在的view

 broser.imageCount = self.selectedImgArray.count;

 broser.delegate = self;

 [broser show];

//网址的iamge

-(NSURL*)photoBrowser:(SDPhotoBrowser *)browser highQualityImageURLForIndex:(NSInteger)index{

    NSString *imageName = arrayImage[index];

    NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@" ,imageName]];

    returnurl;

}

//大图浏览占位图

-(UIImage *)photoBrowser:(SDPhotoBrowser *)browser placeholderImageForIndex:(NSInteger)index {

    UIImage *img =[UIImage imageNamed:@"zhanweitu.png"];

   returnarr[index];

}

相关文章

网友评论

      本文标题:iOS 图片浏览器 SDPhotoBrowser 的使用

      本文链接:https://www.haomeiwen.com/subject/wtkclctx.html