Skip to content

fergusding/iOS-Custom-AlertView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

FDAlertView 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 FDAlertView.h and FDAlertView.m source and add to your project.
  2. Import FDAlertView.h file.
  3. You can use it now in your project.

Usage

Normal AlertView

    FDAlertView *alert = [[FDAlertView alloc] initWithTitle:@"退出登录" icon:nil message:@"确定退出登录吗?" delegate:self buttonTitles:@"确定", @"取消", nil];
    [alert setMessageColor:[UIColor redColor] fontSize:0];
    [alert show];

Icon AlertView

	FDAlertView *alert = [[FDAlertView alloc] initWithTitle:@"退出登录" icon:[UIImage imageNamed:@"exclamation-icon"] message:@"你确定退出登录吗?" delegate:self buttonTitles:@"确定", @"取消", nil];
    [alert show];

Define content AlertView

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

License

 MIT

About

A custom AlertView used in iOS

Resources

License

Stars

Watchers

Forks

Packages

No packages published