{"id":30849182,"url":"https://github.com/lengningln/lnalertsheetview","last_synced_at":"2025-09-07T04:04:42.692Z","repository":{"id":56918882,"uuid":"144247954","full_name":"lengningLN/LNAlertSheetView","owner":"lengningLN","description":"方便的底部选择视图","archived":false,"fork":false,"pushed_at":"2019-05-07T10:20:07.000Z","size":430,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-07T04:03:59.247Z","etag":null,"topics":["alert","bottomalert","objective-c","sheet"],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lengningLN.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-10T06:48:24.000Z","updated_at":"2021-03-17T03:11:54.000Z","dependencies_parsed_at":"2022-08-21T04:50:55.622Z","dependency_job_id":null,"html_url":"https://github.com/lengningLN/LNAlertSheetView","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/lengningLN/LNAlertSheetView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lengningLN%2FLNAlertSheetView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lengningLN%2FLNAlertSheetView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lengningLN%2FLNAlertSheetView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lengningLN%2FLNAlertSheetView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lengningLN","download_url":"https://codeload.github.com/lengningLN/LNAlertSheetView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lengningLN%2FLNAlertSheetView/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273993110,"owners_count":25203796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alert","bottomalert","objective-c","sheet"],"created_at":"2025-09-07T04:03:49.006Z","updated_at":"2025-09-07T04:04:42.683Z","avatar_url":"https://github.com/lengningLN.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LNAlertSheetView\n一套友好的、方便集成的底部item选择视图,性能优秀，集成简单，对原有代码风格不产生任何影响！\n# 继承\n1. 直接把LNActionSheet.h 和 LNActionSheet.m 拖到工程中使用\n2. 使用Cocoapods： pod \"LNAlertSheetView\"\n\n# 本次优化\n1. 改成单利实现，性能更优秀\n2. 多种显示样式可供选择\n3. 多样化的事件处理方式\n\n\n\n# Interduce 【简单介绍】\n- 使用极其简单，一行代码全部搞定\n- UI的显示分为有没有头部描述、有没有子标题\n- 事件的处理分为在LNActionSheetModel内部处理 和 在显示的回调中处理，根据个人的使用习惯而定，没有什么区别\n\n\n\n# Features【能做什么】\n 更快、更简洁\n \n# 目前存在的问题\n 目前没发现问题\n\n# Class【使用到的类】\nLNActionSheet\n\n\n# Getting Started【开始使用】\n\n## 效果演示\n![1](/1.PNG)\n![2](/2.PNG)\n![3](/3.PNG)\n\n## 文字介绍\n- 只需要引入LNActionSheet类，调用+ (void)showWithDesc:(NSString*)desc actionModels:(NSArray\u003cLNActionSheetModel*\u003e *)mdoels action:(void(^)(LNActionSheetModel *model))action; 美好的事情立刻发生\n\n\n-如果需要改变现实的外观，请直接修改头文件中的宏\n#define BG_Color             [UIColor colorWithRed:0 green:0 blue:0 alpha:0.6]    \n#define Bottom_BG_Color      [UIColor colorWithHexString:@\"EFEFEF\"]     \n#define Desc_Color           [UIColor colorWithHexString:@\"#666666\"]   \n#define Desc_Font            [UIFont systemFontOfSize:12]\n#define Item_Normal_Color      [UIColor blackColor]\n#define Item_Normal_Font       [UIFont systemFontOfSize:16]\n#define Sub_Item_Normal_Color  [UIColor blackColor]\n#define Sub_Item_Normal_Font   [UIFont systemFontOfSize:12]\n#define Item_Delete_Color      [UIColor redColor]\n#define Item_Delete_Font       [UIFont systemFontOfSize:13]\n\n\n## 代码介绍\n首先创建需要操作的item对应的model\n```\n NSMutableArray *array = [NSMutableArray new];\n    NSArray *titles = @[@\"加好友\",@\"加关注\",@\"收藏\",@\"举报\",@\"删除\"];\n    NSArray *subTitles = @[@\"找也找也找朋友，找到一个好朋友\",\n                           @\"加关注是成为好友的第一步\",\n                           @\"喜欢的话就保存起来吧\",\n                           @\"涉黄、赌博、消沉的可以举报，帮我们净化环境\",\n                           @\"要慎重哦，删了就全没了\"];\n    for (int i = 0; i \u003c titles.count; i++) {\n        LNActionSheetModel *model = [[LNActionSheetModel alloc]init];\n        model.title = titles[i];\n        model.subTitle = subTitles[i];\n        model.sheetId = i;\n        model.itemType = LNActionSheetItemNoraml;\n        if (i == titles.count-1) {\n            model.itemType = LNActionSheetItemDelete;\n        }\n        [array addObject:model];\n    }\n```\n\n其中model中用到一个枚举，从来表明对应的item的类型\n```\n/**\n item的类型\n\n - LNActionSheetItemNoraml: 默认都是普通类型的\n */\ntypedef  NS_OPTIONS(NSUInteger,LNActionSheetItemType){\n    LNActionSheetItemNoraml = 0,    //普通\n    LNActionSheetItemDelete,        //删除\n    LNActionSheetItemSure,          //确定\n};\n```\n\n然后创建并显示\n```\n [LNActionSheet showWithDesc:@\"有标题和子标题的sheet\" actionModels:[NSArray arrayWithArray:array] action:^(LNActionSheetModel *model) {\n    }];\n```\n\n\n\n# more about  【更多】\n1. 如果有什么问题，请在[issues](https://github.com/lengningLN/LNAlertSheetView/issues)区域提问，我会抽时间改进。\n2. [我的博客](http://lengningln.github.io/)\n3. [我的微博](http://weibo.com/liuning185)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flengningln%2Flnalertsheetview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flengningln%2Flnalertsheetview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flengningln%2Flnalertsheetview/lists"}