http://www.sufeinet.com/plugin.php?id=keke_group

苏飞论坛

 找回密码
 马上注册

QQ登录

只需一步,快速开始

分布式系统框架(V2.0) 轻松承载百亿数据,千万流量!讨论专区 - 源码下载 - 官方教程

HttpHelper爬虫框架(V2.7-含.netcore) HttpHelper官方出品,爬虫框架讨论区 - 源码下载 - 在线测试和代码生成

HttpHelper爬虫类(V2.0) 开源的爬虫类,支持多种模式和属性 源码 - 代码生成器 - 讨论区 - 教程- 例子

查看: 4516|回复: 4

[综合] 【iOS开发实用框架】点击图片大图浏览

[复制链接]
发表于 2018-12-25 13:44:16 | 显示全部楼层 |阅读模式
本帖最后由 竹林风 于 2019-1-7 17:25 编辑

   导读

【iOS开发实用框架】基础教程目录    http://www.sufeinet.com/thread-24348-1-1.html
【iOS开发实用框架】实例目录贴    http://www.sufeinet.com/thread-24654-1-1.html

效果:

3.gif
代码:

[Objective-C] 纯文本查看 复制代码
#import "HomePageVC.h"


@interface HomePageVC (){
    
    NSArray *aryImage;
}

@end

@implementation HomePageVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self hiddenBackBarButtonItems];
    
    
    UILabel *lbl = [MTools creatLblWithFont:kFont(15) TextColor:kColor(orangeColor)];
    lbl.frame = CGRectMake(20, 90, ScreenWidth - 40, 30);
    lbl.text = @"my Style";
    [self.view addSubview:lbl];
    aryImage = @[@"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1545718143449&di=b889c87c3f2113d0b6b432c64b7f0083&imgtype=0&src=http%3A%2F%2Fbbs.crsky.com%2F1236983883%2FMon_1010%2F33_123062_9ed21725e34b436.jpg"
                 ,@"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1545718143450&di=6ff9b17f8bd94134757823290fed6c4a&imgtype=0&src=http%3A%2F%2Fs1.sinaimg.cn%2Flarge%2F006obi0izy7fbFW0aaP87"
                 ,@"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1545717993908&di=3d69513ba604581d6f7ecd5a3d95af01&imgtype=0&src=http%3A%2F%2Fwx2.sinaimg.cn%2Flarge%2F7f6b590cgy1fh45ymrs2yj20yi0n045s.jpg"
                 ,@"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1545717993920&di=069d36606fd5c931f0ccacf4eaf2deb1&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181108%2F107d1a026d13432888d2c63874ade13f.jpeg"
                 ,@"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1545717993921&di=bddf049946052e7c2c47e7442bd8ff58&imgtype=0&src=http%3A%2F%2Fimg.xsee.cc%2Fupload%2Falbum%2F2015%2F08%2F29%2Ff59fa4f4-ff7c-449d-8a6c-4e98258231c3-1200x671.jpg"
                 ,@"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1545717993923&di=3d41f4448f1b109ba9f9db2f862164ae&imgtype=0&src=http%3A%2F%2Ftu.simei8.com%3A7788%2Fpic126%2F12605-2.jpg",
                 @"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1545717993924&di=8b5e5fe04a79b9c364b18dc658cde3d2&imgtype=0&src=http%3A%2F%2Fpic.rmb.bdstatic.com%2F92681f91f9004125caf7d84dbbfd1771.jpeg",
                 @"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1545717993925&di=8deba72d20e3830417ac69c4d7f17233&imgtype=0&src=http%3A%2F%2Fwww.shangbiaomyd.com%2Fuploads%2FCuteEditor%2F20150130144058313.jpg"
                 ,@"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1545717993925&di=f413c95a8217490f4da62622c389bb5d&imgtype=0&src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fblog%2F201403%2F13%2F20140313101142_NcBJt.jpeg"
                 ,@"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1545717993928&di=02cd4e9a6ac76045beaffba7ef2b4663&imgtype=0&src=http%3A%2F%2Fattachments.gfan.com%2Fforum%2Fattachments2%2Fday_110907%2F1109071959e3f9a92e0283af86.jpg"];
    for (int i = 0; i < 6; i ++) {
        UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(20 + (100 + 10)*(i%3), lbl.frameBottom + 10 + (100 + 10)*(i/3), 100, 100)];
        [imageView sd_setImageWithURL:kURL(aryImage[i]) placeholderImage:nil];
        imageView.contentMode = UIViewContentModeScaleAspectFill;
        imageView.clipsToBounds = YES;
        imageView.tag = i;
        [imageView addTapGestureWithBlock:^(id sender) {
            [self didBrowserImages:(UIImageView *)sender];
        }];
        [self.view addSubview:imageView];
    }
    
}

-(void)didBrowserImages:(UIImageView *)sender{
    
    [[Global shareGlobal] browserImageWithArray:aryImage CurrentImageView:sender];
}


附件: 浏览图片.zip (693.52 KB, 下载次数: 0)


1. 开通SVIP会员,免费下载本站所有源码,不限次数据,不限时间
2. 加官方QQ群,加官方微信群获取更多资源和帮助
3. 找站长苏飞做网站、商城、CRM、小程序、App、爬虫相关、项目外包等点这里
发表于 2018-12-25 14:16:32 | 显示全部楼层
我只是路过打酱油的。
发表于 2018-12-25 17:24:59 | 显示全部楼层
强烈支持楼主ing……
发表于 2018-12-25 17:34:30 | 显示全部楼层
强烈支持楼主ing……
发表于 2018-12-28 08:29:30 | 显示全部楼层
强烈支持楼主ing……
您需要登录后才可以回帖 登录 | 马上注册

本版积分规则

QQ|手机版|小黑屋|手机版|联系我们|关于我们|广告合作|苏飞论坛 ( 豫ICP备18043678号-2)

GMT+8, 2024-11-22 13:32

© 2014-2021

快速回复 返回顶部 返回列表