Latest 0.0.3
Homepage https://github.com/tangshenchun/TSCAlertView
License MIT
Platforms ios 7.0
Dependencies AFNetworking
Authors

自定义弹框控件(AlertView)

仿照原生UIAlertView和UIAlertController显示效果实现。

Introduction

TSCAlertView is a alert view which can modify the text color and font size of it’s content automaticlly, also it allows to define the content view by yourself. Otherwise, it support to add logo into alert view.

ScreenShot

Normal-AlertView
Icon-AlertView
Define-Content-AlertView

Get started

  1. Download the TSCAlertView.h and TSCAlertView.m source and add to your project.
  2. Import TSCAlertView.h file.
  3. You can use it now in your project.

Usage

Normal AlertView

    NSMutableArray * titleArr = [NSMutableArray arrayWithObjects:@"取消",@"确定", nil];
    TSCAlertView * alert = [[TSCAlertView alloc] initWithTitle:@"退出登录" icon:nil message:@"确定退出登录吗?" buttonTitles:titleArr 
                                                buttonEvent:^(NSInteger tag) {
                                                     NSLog(@"%ld",(long)tag);
                                                }];
    [alert show];

Icon AlertView

    NSMutableArray * titleArr = [NSMutableArray arrayWithObjects:@"取消",@"确定", nil];
    TSCAlertView * alert = [[TSCAlertView alloc] initWithTitle:@"退出登录" icon:[UIImage imageNamed:@"exclamation-icon"] message:@"确定退出登录吗?"
                                                 buttonTitles:titleArr buttonEvent:^(NSInteger tag) {
                                                    NSLog(@"%ld",(long)tag);
                                                }];
    [alert show];

Define content AlertView

    TSCAlertView *alert = [[TSCAlertView alloc] init];
    ContentView *contentView = "YOUR DEFINE VIEW";
    contentView.frame = "YOUR DEFINE VIEW FRAME TO SHOW";
    alert.contentView = contentView;
    [alert show];

Latest podspec

{
    "name": "TSCAlertView",
    "version": "0.0.3",
    "summary": "u81eau5b9au4e49TSCAlertView.",
    "description": "Custom TSCAlertView",
    "homepage": "https://github.com/tangshenchun/TSCAlertView",
    "license": "MIT",
    "authors": {
        "Jason Tang": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/tangshenchun/TSCAlertView.git",
        "tag": "0.0.3"
    },
    "source_files": [
        "TSCAlertView/TSCAlertViewDemo",
        "TSCAlertViewDemo/**/*.{h,m}"
    ],
    "dependencies": {
        "AFNetworking": [
            "~> 3.1.0"
        ]
    }
}

Pin It on Pinterest

Share This