{"id":13743079,"url":"https://github.com/12207480/TYAlertController","last_synced_at":"2025-05-09T00:32:38.519Z","repository":{"id":56923528,"uuid":"45040232","full_name":"12207480/TYAlertController","owner":"12207480","description":"Powerful, Easy to use alert view or popup view on controller and window, support blur effects,custom view and animation,for objective-c,support iphone, ipad","archived":false,"fork":false,"pushed_at":"2022-06-13T15:10:21.000Z","size":1105,"stargazers_count":1316,"open_issues_count":18,"forks_count":240,"subscribers_count":47,"default_branch":"master","last_synced_at":"2025-04-08T02:41:23.681Z","etag":null,"topics":["alert","alertcontroller","alertview"],"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/12207480.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":"2015-10-27T12:40:34.000Z","updated_at":"2025-04-04T00:50:28.000Z","dependencies_parsed_at":"2022-08-20T22:10:05.356Z","dependency_job_id":null,"html_url":"https://github.com/12207480/TYAlertController","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/12207480%2FTYAlertController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/12207480%2FTYAlertController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/12207480%2FTYAlertController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/12207480%2FTYAlertController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/12207480","download_url":"https://codeload.github.com/12207480/TYAlertController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253171163,"owners_count":21865275,"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":["alert","alertcontroller","alertview"],"created_at":"2024-08-03T05:00:40.073Z","updated_at":"2025-05-09T00:32:37.136Z","avatar_url":"https://github.com/12207480.png","language":"Objective-C","funding_links":[],"categories":["Objective-C  Stars 1000以内排名整理","iOS"],"sub_categories":["界面控件"],"readme":"# TYAlertController\nPowerful, Easy to use alertView or popupView on controller and window, support blur effect, custom view and custom animation, use aotolayout.support iphone, ipad .\n\n## CocoaPods\n```\npod 'TYAlertController'\n```\n\n### ScreenShot\n![image](https://github.com/12207480/TYAlertController/blob/master/screenshot/TYAlertControllerDemo.gif)\n\n### Requirements\n* Xcode 5 or higher\n* iOS 7.0 or higher\n* ARC\n\n### Usage\n\n1.copy TYAlertController Folder to your project, if you want to have blur effect ,you need copy Blur Effects Folder to your project.\u003cbr\u003e\n2. #import \"UIView+TYAlertView.h\", when you use it, if you want use blur effect, #import \"TYAlertController+BlurEffects.h\".\u003cbr\u003e\n3. you can use TYAlertController show in controller, or use TYShowAlertView show in window, or use Category UIView+TYAlertView convenient show alertview.\u003cbr\u003e\n4. check Demo，it have more usefull usage and example.\n\n### usege demo\n\n* alertView lifecycle block\n```objc\n// alertView lifecycle block\n@property (copy, nonatomic) void (^viewWillShowHandler)(UIView *alertView);\n@property (copy, nonatomic) void (^viewDidShowHandler)(UIView *alertView);\n@property (copy, nonatomic) void (^viewWillHideHandler)(UIView *alertView);\n@property (copy, nonatomic) void (^viewDidHideHandler)(UIView *alertView);\n\n// dismiss controller completed block\n@property (nonatomic, copy) void (^dismissComplete)(void);\n```\n\n* show in controller (tow way)(recommend)\n```objc\nTYAlertView *alertView = [TYAlertView alertViewWithTitle:@\"TYAlertView\" message:@\"This is a message, the alert view containt text and textfiled. \"];\n    \n    [alertView addAction:[TYAlertAction actionWithTitle:@\"取消\" style:TYAlertActionStyleCancle handler:^(TYAlertAction *action) {\n        NSLog(@\"%@\",action.title);\n    }]];\n\n    [alertView addAction:[TYAlertAction actionWithTitle:@\"确定\" style:TYAlertActionStyleDestructive handler:^(TYAlertAction *action) {\n        NSLog(@\"%@\",action.title);\n    }]];\n    \n    [alertView addTextFieldWithConfigurationHandler:^(UITextField *textField) {\n        textField.placeholder = @\"请输入账号\";\n    }];\n    [alertView addTextFieldWithConfigurationHandler:^(UITextField *textField) {\n        textField.placeholder = @\"请输入密码\";\n    }];\n    \n    // first way to show\n    TYAlertController *alertController = [TYAlertController alertControllerWithAlertView:alertView preferredStyle:TYAlertControllerStyleAlert];\n    //alertController.alertViewOriginY = 60;\n    [self presentViewController:alertController animated:YES completion:nil];\n    \n    // second way to show,use UIView Category\n    //[alertView showInController:self preferredStyle:TYAlertControllerStyleAlert];\n```\n\n* show in window (tow way)\n```objc\nTYAlertView *alertView = [TYAlertView alertViewWithTitle:@\"TYAlertView\" message:@\"A message should be a short, but it can support long message\"];\n    \n    [alertView addAction:[TYAlertAction actionWithTitle:@\"取消\" style:TYAlertActionStyleCancle handler:^(TYAlertAction *action) {\n        NSLog(@\"%@\",action.title);\n    }]];\n    \n    [alertView addAction:[TYAlertAction actionWithTitle:@\"确定\" style:TYAlertActionStyleDestructive handler:^(TYAlertAction *action) {\n        NSLog(@\"%@\",action.title);\n    }]];\n    \n    // first way to show ,use UIView Category\n    [alertView showInWindowWithOriginY:200 backgoundTapDismissEnable:YES];\n    \n    // second way to show\n   // [TYShowAlertView showAlertViewWithView:alertView originY:200 backgoundTapDismissEnable:YES];\n```\n\n### Contact\nif you find bug，please pull reqeust me \u003cbr\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F12207480%2FTYAlertController","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F12207480%2FTYAlertController","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F12207480%2FTYAlertController/lists"}