All Projects → lengningLN → Lnalertsheetview

lengningLN / Lnalertsheetview

Licence: mit
方便的底部选择视图

Labels

Projects that are alternatives of or similar to Lnalertsheetview

Cfnotify
A customizable framework to create draggable views
Stars: ✭ 490 (+3983.33%)
Mutual labels:  alert
Spug
开源运维平台:面向中小型企业设计的轻量级无Agent的自动化运维平台,整合了主机管理、主机批量执行、主机在线终端、文件在线上传下载、应用发布部署、在线任务计划、配置中心、监控、报警等一系列功能。
Stars: ✭ 6,810 (+56650%)
Mutual labels:  alert
Lcactionsheet
一款简约而不失强大的 ActionSheet,微博、微信和 QQ 都采用了极其类似的样式,完全支持 Swift。
Stars: ✭ 809 (+6641.67%)
Mutual labels:  alert
Sweetalert
A beautiful replacement for JavaScript's "alert"
Stars: ✭ 21,871 (+182158.33%)
Mutual labels:  alert
Swiftentrykit
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps.
Stars: ✭ 5,706 (+47450%)
Mutual labels:  alert
Wmzdialog
功能最多样式最多的弹窗,支持普通/微信底部/日期/地区/日历/选择/编辑/分享/菜单/自定义弹窗等,支持多种动画,链式编程调用(Pop-up windows with the most functions and styles, support normal/WeChat bottom/date/region/calendar/select/edit/share/menu/custom pop-up windows, etc., support multiple animations, chain programming calls)
Stars: ✭ 673 (+5508.33%)
Mutual labels:  alert
Overhang.js
🔔 A jQuery plugin for notifications, prompts and confirmations.
Stars: ✭ 437 (+3541.67%)
Mutual labels:  alert
Cronmanager
A tool for monitoring Linux cron jobs duration and exit status using Node Exporter and Prometheus. Written in Go.
Stars: ✭ 17 (+41.67%)
Mutual labels:  alert
Ffpopup
⛩ Presenting custom views as a popup in iOS.
Stars: ✭ 618 (+5050%)
Mutual labels:  alert
Fcalertview
FCAlertView is a Flat Customizable AlertView for iOS (Written in Objective C)
Stars: ✭ 777 (+6375%)
Mutual labels:  alert
Alerttransition
AlertTransition is a extensible library for making view controller transitions, especially for alert transitions.
Stars: ✭ 565 (+4608.33%)
Mutual labels:  alert
Miblurpopup
MIBlurPopup lets you create popups with a blurred background
Stars: ✭ 598 (+4883.33%)
Mutual labels:  alert
Sweet Alert
A simple PHP package to show SweetAlerts with the Laravel Framework
Stars: ✭ 753 (+6175%)
Mutual labels:  alert
Ngx Sweetalert2
Declarative, reactive, and template-driven SweetAlert2 integration for Angular
Stars: ✭ 503 (+4091.67%)
Mutual labels:  alert
Statusalert
Display Apple system-like self-hiding status alerts. It is well suited for notifying user without interrupting user flow in iOS-like way.
Stars: ✭ 809 (+6641.67%)
Mutual labels:  alert
Easyshowview
一款非常简单的展示工具。提示框,加载框,空白页提示,alert弹出框。一行代码搞定所有操作。
Stars: ✭ 447 (+3625%)
Mutual labels:  alert
Fftoast
A very powerful iOS message notifications and AlertView extensions. It can be easily realized from the top of the screen, the bottom of the screen and the middle of the screen pops up a notification. You can easily customize the pop-up View.
Stars: ✭ 649 (+5308.33%)
Mutual labels:  alert
Settingscompat
特殊权限(Special Permissions)兼容库,悬浮窗权限(SYSTEM_ALERT_WINDOW)与系统设置修改权限(WRITE_SETTINGS)
Stars: ✭ 942 (+7750%)
Mutual labels:  alert
Prometheusalert
Prometheus Alert是开源的运维告警中心消息转发系统,支持主流的监控系统Prometheus,Zabbix,日志系统Graylog和数据可视化系统Grafana发出的预警消息,支持钉钉,微信,华为云短信,腾讯云短信,腾讯云电话,阿里云短信,阿里云电话等
Stars: ✭ 822 (+6750%)
Mutual labels:  alert
Notie
🔔 a clean and simple notification, input, and selection suite for javascript, with no dependencies
Stars: ✭ 6,170 (+51316.67%)
Mutual labels:  alert

LNAlertSheetView

一套友好的、方便集成的底部item选择视图,性能优秀,集成简单,对原有代码风格不产生任何影响!

继承

  1. 直接把LNActionSheet.h 和 LNActionSheet.m 拖到工程中使用
  2. 使用Cocoapods: pod "LNAlertSheetView"

本次优化

  1. 改成单利实现,性能更优秀
  2. 多种显示样式可供选择
  3. 多样化的事件处理方式

Interduce 【简单介绍】

  • 使用极其简单,一行代码全部搞定
  • UI的显示分为有没有头部描述、有没有子标题
  • 事件的处理分为在LNActionSheetModel内部处理 和 在显示的回调中处理,根据个人的使用习惯而定,没有什么区别

Features【能做什么】

更快、更简洁

目前存在的问题

目前没发现问题

Class【使用到的类】

LNActionSheet

Getting Started【开始使用】

效果演示

1 2 3

文字介绍

  • 只需要引入LNActionSheet类,调用+ (void)showWithDesc:(NSString*)desc actionModels:(NSArray<LNActionSheetModel*> *)mdoels action:(void(^)(LNActionSheetModel *model))action; 美好的事情立刻发生

-如果需要改变现实的外观,请直接修改头文件中的宏 #define BG_Color [UIColor colorWithRed:0 green:0 blue:0 alpha:0.6]
#define Bottom_BG_Color [UIColor colorWithHexString:@"EFEFEF"]
#define Desc_Color [UIColor colorWithHexString:@"#666666"]
#define Desc_Font [UIFont systemFontOfSize:12] #define Item_Normal_Color [UIColor blackColor] #define Item_Normal_Font [UIFont systemFontOfSize:16] #define Sub_Item_Normal_Color [UIColor blackColor] #define Sub_Item_Normal_Font [UIFont systemFontOfSize:12] #define Item_Delete_Color [UIColor redColor] #define Item_Delete_Font [UIFont systemFontOfSize:13]

代码介绍

首先创建需要操作的item对应的model

 NSMutableArray *array = [NSMutableArray new];
    NSArray *titles = @[@"加好友",@"加关注",@"收藏",@"举报",@"删除"];
    NSArray *subTitles = @[@"找也找也找朋友,找到一个好朋友",
                           @"加关注是成为好友的第一步",
                           @"喜欢的话就保存起来吧",
                           @"涉黄、赌博、消沉的可以举报,帮我们净化环境",
                           @"要慎重哦,删了就全没了"];
    for (int i = 0; i < titles.count; i++) {
        LNActionSheetModel *model = [[LNActionSheetModel alloc]init];
        model.title = titles[i];
        model.subTitle = subTitles[i];
        model.sheetId = i;
        model.itemType = LNActionSheetItemNoraml;
        if (i == titles.count-1) {
            model.itemType = LNActionSheetItemDelete;
        }
        [array addObject:model];
    }

其中model中用到一个枚举,从来表明对应的item的类型

/**
 item的类型

 - LNActionSheetItemNoraml: 默认都是普通类型的
 */
typedef  NS_OPTIONS(NSUInteger,LNActionSheetItemType){
    LNActionSheetItemNoraml = 0,    //普通
    LNActionSheetItemDelete,        //删除
    LNActionSheetItemSure,          //确定
};

然后创建并显示

 [LNActionSheet showWithDesc:@"有标题和子标题的sheet" actionModels:[NSArray arrayWithArray:array] action:^(LNActionSheetModel *model) {
    }];

more about 【更多】

  1. 如果有什么问题,请在issues区域提问,我会抽时间改进。
  2. 我的博客
  3. 我的微博
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].