Latest 1.0.1
Homepage https://github.com/CoderWGB/WGBCustomAlertView
License MIT
Platforms ios 8.0, requires ARC
Authors

WGBCustomAlertView

Version
License
Platform

自定义弹窗视图

支持pod私有库的引入


pod 'WGBCustomAlertPopupView'

三行代码 搞定一个弹窗

"Talk is cheap show me your code !"

首先引入头文件 #import "WGBCustomPopUpView.h"

    //实例化   
    WGBCustomPopUpView *popUpView = [[WGBCustomPopUpView alloc] init];

    UIView *bgView = [[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds];
    bgView.userInteractionEnabled = YES;
    bgView.backgroundColor = [UIColor clearColor] ;

    UIView *redView = [[UIView alloc] init];
    redView.frame = CGRectMake(0,kScreenHeight-200,375,200);
    redView.backgroundColor =[UIColor redColor];
    redView.center = CGPointMake(bgView.frame.size.width/2, bgView.frame.size.height/2);
    [bgView addSubview: redView];

    /// 以下三行才是关键代码 
    popUpView.contentView = redView;  //设置内容视图
    popUpView.animationType = arc4random()%6;  //设置弹窗动画类型  随机枚举值  
    [popUpView show]; // 弹出来瞧瞧

    // 必要的时候消除弹窗
        popUpView.touchDismiss = YES;
        [popUpView dismiss];
以上…

Latest podspec

{
    "name": "WGBCustomAlertPopupView",
    "version": "1.0.1",
    "summary": "u9ad8u5ea6u5b9au5236u5316u7684u81eau5b9au4e49u5f39u7a97u5c0fu7ec4u4ef6,u63d0u4f9bu4e0au4e0bu5de6u53f3u4e2du5fc3u5404u79cdu4f4du7f6eu7684u5f39u7a97u52a8u753b,u80fdu591fu5e94u5bf9u57fau672cu7684u4e1au52a1u5f00u53d1",
    "description": "u65b9u4fbfu5febu6377,u8026u5408u6027u4f4e,u590du7528u6027u9ad8,u6301u7eedu66f4u65b0,u656cu8bf7u5173u6ce8. u652fu6301u81eau5b9au4e49viewu548cu81eau5b9au4e49controlleru7684u7b80u5355u5f39u51fau5c55u793a",
    "homepage": "https://github.com/CoderWGB/WGBCustomAlertView",
    "license": "MIT",
    "authors": {
        "wangguibin": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/CoderWGB/WGBCustomAlertView.git",
        "tag": "1.0.1"
    },
    "source_files": [
        "WGBCustomAlertView",
        "WGBCustomAlertView/**/WGBCustomPopUpView.{h,m}"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This