美文网首页iOS轮子iOS Developer牛叉的demo
简单易用的启动页广告封装BLADLaunchViewContro

简单易用的启动页广告封装BLADLaunchViewContro

作者: boundlessocean | 来源:发表于2016-11-15 16:26 被阅读87次

    先奉上地址:
    github:https://github.com/boundlessocean/BLADLaunchImageController.git

    效果如下:


    demo.gif

    生成的gif 有点渣

    主要功能

    1、根据URL显示广告图
    2、使用YYWebImage加载网络图片,可根据项目使用的网络加载框架修改源码使用其他框架(二逼了,做了图片缓存后才想起YYWebImage是自带缓存的)
    3、提供duration 设置广告图显示时间
    4、广告图消失默认放大渐隐,可设置为直接移除。
    使用方法

    BLADLaunchViewController *launchController = [[BLADLaunchViewController alloc]init];
    [launchController bl_setADLaunchImageWithURL:
                                                [NSURL URLWithString:@"http://img1.gamedog.cn/2013/07/19/43-130G91539210.jpg"]
                        ADlaunchImagePlaceholder:nil 
                                      completion:nil];
    // 以下属性可设置
    // launchController.duration = 5;
    // launchController.dismissType = BLADLanuchImageDismissTypeNone;
    
    接下来添加到根控制器
    [rootViewController addChildViewController:launchController];
    [rootViewController.view addSubview:launchController.view];
    
    

    相关文章

      网友评论

        本文标题:简单易用的启动页广告封装BLADLaunchViewContro

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