{"id":2447,"url":"https://github.com/roycms/AlertView","last_synced_at":"2025-08-02T23:33:37.800Z","repository":{"id":62451749,"uuid":"70875641","full_name":"roycms/AlertView","owner":"roycms","description":"AlertView, Ios popup window, A pop-up framework, Can be simple and convenient to join your project. IOS 提示框，IOS弹框，IOS弹窗","archived":false,"fork":false,"pushed_at":"2016-12-01T01:05:09.000Z","size":1418,"stargazers_count":76,"open_issues_count":1,"forks_count":8,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-04-24T14:48:35.058Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/roycms.png","metadata":{"files":{"readme":"README-CN.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":"2016-10-14T05:01:50.000Z","updated_at":"2024-04-12T10:31:00.000Z","dependencies_parsed_at":"2022-11-01T23:46:24.836Z","dependency_job_id":null,"html_url":"https://github.com/roycms/AlertView","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roycms%2FAlertView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roycms%2FAlertView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roycms%2FAlertView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roycms%2FAlertView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roycms","download_url":"https://codeload.github.com/roycms/AlertView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228503221,"owners_count":17930543,"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","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":[],"created_at":"2024-01-05T20:16:13.996Z","updated_at":"2024-12-06T17:31:06.568Z","avatar_url":"https://github.com/roycms.png","language":"Objective-C","funding_links":[],"categories":["UI"],"sub_categories":["Alert \u0026 Action Sheet","Other free courses"],"readme":" ![Logo](https://roycms.github.io/AlertView/RAlert/logo.png)\n RAlertView ios弹窗\n===\nAlertView 是一个ios弹窗框架，可以很简单的集成到自己的项目内，支持pod.\n\n[![Shippable](https://img.shields.io/shippable/5444c5ecb904a4b21567b0ff.svg?maxAge=2592000?style=flat-square)](https://github.com/roycms/RAlertView)\n[![CocoaPods](https://img.shields.io/badge/pod-0.0.1-red.svg)](http://cocoapods.org/?q=RAlertView)\n[![Packagist](https://img.shields.io/packagist/l/doctrine/orm.svg?maxAge=2592000?style=flat-square)](https://github.com/roycms/RAlertView/blob/master/LICENSE)\n[![email](https://img.shields.io/badge/%20email%20-%20roycms%40qq.com%20-yellowgreen.svg)](mailto:roycms@qq.com)\n\n## 动画预览\n ![Warning content](https://roycms.github.io/AlertView/RAlert/RAlert.gif)\n \n## 安装\n- 手动安装依赖 ` Masonry ` 和 ` HexColors ` 框架，如果项目没有引入请导入这两个框架\n- 在需要的地方导入：`#import \"RAlertView.h\"` 你懂的\n\n## cocoapods 安装\n`  pod 'RAlertView' `\n\n## 弹窗类型  AlertStyle\n```objective-c\ntypedef NS_ENUM(NSInteger,AlertStyle) {\n    SimpleAlert = 0,\n    ConfirmAlert,\n    CancelAndConfirmAlert,\n};\n```\n![RAlertView Preview](https://roycms.github.io/AlertView/RAlert/AlertStyle.jpg)\n## 弹窗主题效果  AlertTheme\n```objective-c\n   RAlertView *alert = [[RAlertView alloc] initWithStyle:CancelAndConfirmAlert];\n   alert.theme =[UIColor redColor];\n```\n![RAlertView Preview](https://roycms.github.io/AlertView/RAlert/Theme.jpg)\n\n## 一些属性设置\n* 设置单击背景或者任意位置都可以关闭弹窗\n```objective-c\nalert.isClickBackgroundCloseWindow = YES;\n```\n* 设置弹窗内容的文字的对齐是否居中\n```objective-c\nalert.contentTextLabel.text =@\"SimpleAlert \\nAlertView A pop-up framework, Can be simple and convenient to join your project\";\n\nalert.contentTextLabel.attributedText = [TextHelper attributedStringForString:@\"AlertView A pop-up framework, Can be simple and convenient to join your project\" lineSpacing:5];\n```\n\n## 初始化弹窗  RAlertView\n* 按照样式初始化 initWithStyle AlertStyle\n```objective-c\nRAlertView *alert = [[RAlertView alloc] initWithStyle:SimpleAlert];\n```\n* 按照样式和宽度初始化  width的值可以设置0-1表示小对于屏幕宽度的百分比，如果大于1的值则按照px像素处理 initWithStyle AlertStyle and width\n```objective-c\nRAlertView *alert = [[RAlertView alloc] initWithStyle:SimpleAlert width:0.8];\n```\n## SimpleAlert\n```objective-c\nRAlertView *alert = [[RAlertView alloc] initWithStyle:SimpleAlert width:0.8];\nalert.isClickBackgroundCloseWindow = YES;\nalert.contentTextLabel.text =@\"SimpleAlert \\nAlertView A pop-up framework, Can be simple and convenient to join your project\";\n```\n## ConfirmAlert\n```objective-c\nRAlertView *alert = [[RAlertView alloc] initWithStyle:ConfirmAlert];\nalert.headerTitleLabel.text = @\"ConfirmAlert\";\nalert.contentTextLabel.attributedText = [TextHelper attributedStringForString:@\"AlertView A pop-up framework, Can be simple and convenient to join your project\" lineSpacing:5];\n[alert.confirmButton setTitle:@\"Ok\" forState:UIControlStateNormal];\nalert.confirm = ^(){\n        NSLog(@\"Click on the Ok\");\n   };\n\n```\n## CancelAndConfirmAlert\n```objective-c\nRAlertView *alert = [[RAlertView alloc] initWithStyle:CancelAndConfirmAlert];\nalert.headerTitleLabel.text = @\"CancelAndConfirmAlert\";\nalert.contentTextLabel.attributedText = [TextHelper attributedStringForString:@\"AlertView A pop-up framework, Can be simple and convenient to join your project\" lineSpacing:5];;\n[alert.confirmButton setTitle:@\"Ok\" forState:UIControlStateNormal];\n[alert.cancelButton setTitle:@\"Cancel\" forState:UIControlStateNormal];\nalert.confirm = ^(){\n        NSLog(@\"Click on the Ok\");\n   };\nalert.cancel = ^(){\n        NSLog(@\"Click on the Cancel\");\n   };\n```\n## 期待\n* 如果在使用过程中遇到BUG，希望你能Issues我，谢谢（或者尝试下载最新的框架代码看看BUG修复没有）\n* 如果在使用过程中发现功能不够用，希望你能Issues我，我非常想为这个框架增加更多好用的功能，谢谢\n* 如果你想为RAlertView输出代码，请拼命Pull Requests我\n\n排版规范参考 https://github.com/sparanoid/chinese-copywriting-guidelines\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froycms%2FAlertView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froycms%2FAlertView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froycms%2FAlertView/lists"}