Giter Club home page Giter Club logo

cbwalertsheet's Introduction

CBWAlertSheet

###自己写的 AlertSheet,总共有3种样式

这个 alertSheet模仿微信的样式,尺寸,文字大小,布局都是跟微信一样的;可以自定义title/message/button/取消按钮等颜色哦.但是文字的大小,布局不可以改变,感觉微信的布局真心不错呢!"

###1.有标题,有取消按钮--可以自定义 title/message 文字颜色

有标题和取消按钮样式

- (void)customAlertSheet{
    
    CBWAlertSheet *sheet = [[CBWAlertSheet alloc]init];
    sheet.type = CBWAlertSheetTypeCancelButton;
    sheet.title = @"标题😄";
    sheet.message = @"这个 alertSheet模仿微信的样式,尺寸,文字大小,布局都是跟微信一样的;可以自定义title/message/button/取消按钮等颜色哦.但是文字的大小,布局不可以改变,感觉微信的布局真心不错呢!";
    sheet.titleTextColor = [UIColor redColor];
    sheet.messageTextColor = [UIColor greenColor];
    sheet.cancleButtonColor = [UIColor redColor];
    sheet.cancleButtonTextColor = [UIColor yellowColor];
    [sheet addSheetWithTitle:@"好的,去点个赞!" color:nil handler:nil];
    [sheet addSheetWithTitle:@"去意已决" color:nil handler:nil];
    [sheet show];
}

###2.没有标题,有取消按钮--可以自定取消按钮的文字颜色/背景颜色

没有标题,有取消按钮样式

- (void)customAlertSheetNoTitleType{
    
    //关闭或者修改手势密码
    CBWAlertSheet *sheet = [[CBWAlertSheet alloc]init];
    sheet.type = CBWAlertSheetTypeCancelButton;
      sheet.titleTextColor = [UIColor redColor];
    sheet.messageTextColor = [UIColor greenColor];
    sheet.cancleButtonColor = [UIColor redColor];
    sheet.cancleButtonTextColor = [UIColor yellowColor];
    [sheet addSheetWithTitle:@"胖子,快去减肥啦!" color:[UIColor blackColor] handler:nil];
    [sheet addSheetWithTitle:@"黑子,你又变胖啦!" color:[UIColor blackColor] handler:nil];
    [sheet show];

}

###3.没有取消按钮,没有标题

没有取消按钮,没有标题样式


- (void)customAlertSheetNoCancelType{
    
    CBWAlertSheet *sheet = [[CBWAlertSheet alloc]init];
    sheet.titleTextColor = [UIColor redColor];
    sheet.messageTextColor = [UIColor greenColor];
    sheet.cancleButtonColor = [UIColor redColor];
    sheet.cancleButtonTextColor = [UIColor yellowColor];
    [sheet addSheetWithTitle:@"羊小年" color:[UIColor blackColor] handler:nil];
    [sheet addSheetWithTitle:@"陈小黑" color:[UIColor blackColor] handler:nil];
    [sheet addSheetWithTitle:@"The next..." color:[UIColor blackColor] handler:nil];

    [sheet show];

    
}

使用方法:

  1. 直接拖'CBWAlertSheet'的. h 和 .m 文件 2.使用 pod 'CBWAlertSheet'

github 地址

如果喜欢帮我 start 一下哦!

cbwalertsheet's People

Contributors

xerocbw avatar

Stargazers

MansionWayh avatar  avatar 晋先森 avatar  avatar Carabineiro avatar

Watchers

James Cloos avatar Carabineiro avatar  avatar

Forkers

carabina

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.