gitHub那些优秀的库和想要实现的效果

1. 轮播库SDCycleScrollView

2. 自动布局库SDAutoLayout

3. 类似支付宝福卡滑动切换的效果 https://github.com/huangxuan518/HXCardSwitchView

4. 类似朋友圈图片浏览SDPhotoBrowser :SDAutoLayout 中也能找到哦,基本思路就是,点击之后用UIScrollView表示,添加单机双击手势,利用UIScrollView的缩放属性来做。

使用SDPhotoBrowser最重要的几个参数:比如这里是调起

SDPhotoBrowser

图片浏览的地方

- (void)tapImageView:(UITapGestureRecognizer *)tap
{
    UIView *imageView = tap.view;
    SDPhotoBrowser *browser = [[SDPhotoBrowser alloc] init];
    browser.currentImageIndex = imageView.tag; //当前点击的图片下标
    browser.sourceImagesContainerView = self;//self就是cell中的imgV的父view 
    browser.imageCount = (int)self.photos.count; //图片的数量
    //browser.imageCount = self.picPathStringsArray.count;
    browser.delegate = self; //设置代理 在代理方法中加载放大后的图片
    [browser show]; 
    
}

还有两个重要的代理方法:

#pragma mark - SDPhotoBrowserDelegate




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


{


//    return [NSURL URLWithString:@"http://img01.taopic.com/160615/240367-16061509430238.jpg"];


    


    return [NSURL URLWithString:_imgArr[index]];


}




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


{


    


    CheckListCVCell * cell = (CheckListCVCell *)[self.collectionV cellForItemAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0]];


    


    UIImageView *imageView = cell.imageV;


    


    return imageView.image;


}








此文仅为鄙人学习笔记之用,朋友你来了,如有不明白或者建议又或者想给我指点一二,请私信我。liuw_flexi@163.com/QQ群:582039935. 我的gitHub: (学习代码都在gitHub) https://github.com/nwgdegitHub/
原文地址:https://www.cnblogs.com/liuw-flexi/p/8918648.html