{"id":2406,"url":"https://github.com/nealyoung/NYAlertViewController","last_synced_at":"2025-08-02T23:33:30.197Z","repository":{"id":35168649,"uuid":"39424649","full_name":"nealyoung/NYAlertViewController","owner":"nealyoung","description":"Highly configurable iOS Alert Views with custom content views","archived":false,"fork":false,"pushed_at":"2023-05-15T08:04:43.000Z","size":23900,"stargazers_count":609,"open_issues_count":27,"forks_count":107,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-10-30T02:37:02.956Z","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/nealyoung.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-07-21T04:49:40.000Z","updated_at":"2024-01-10T16:50:36.000Z","dependencies_parsed_at":"2024-01-02T21:14:33.062Z","dependency_job_id":"b44a3897-d362-4b48-8af6-9fe649dc2623","html_url":"https://github.com/nealyoung/NYAlertViewController","commit_stats":{"total_commits":98,"total_committers":4,"mean_commits":24.5,"dds":"0.030612244897959218","last_synced_commit":"32b0dc860c61c9b11e5d00e5fc1581bcd742cfe6"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nealyoung%2FNYAlertViewController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nealyoung%2FNYAlertViewController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nealyoung%2FNYAlertViewController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nealyoung%2FNYAlertViewController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nealyoung","download_url":"https://codeload.github.com/nealyoung/NYAlertViewController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228017951,"owners_count":17856841,"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:12.964Z","updated_at":"2024-12-06T17:31:04.413Z","avatar_url":"https://github.com/nealyoung.png","language":"Objective-C","funding_links":[],"categories":["UI","Objective-C"],"sub_categories":["Alert \u0026 Action Sheet","Other free courses"],"readme":"# NYAlertViewController\n\nNYAlertViewController is a replacement for UIAlertController/UIAlertView with support for content views and UI customization.\n\n![Example](https://github.com/nealyoung/NYAlertViewController/raw/master/header.png)\n\n### Features\n* Includes content view property for adding custom views to the alert view\n* Block-based API similar to UIAlertController/UIAlertAction\n* Support for all screen orientations and iPad screen sizes\n* Easily add text fields with simple API identical to UIAlertController\n* Choose between fade (similar to UIAlertController) or slide transition animations\n\n### Installation\n#### Manual\nAdd the files to your project manually by dragging the NYAlertViewController directory into your Xcode project.\n\n#### CocoaPods\nAdd `pod 'NYAlertViewController'` to your Podfile, and run `pod install`.\n\n### Usage Example\nAn Objective-C example project demonstrating customization options is included in the NYAlertViewControllerDemo directory.\n\n#### Objective-C\n\n```objc\n// Import the class and create an NYAlertViewController instance\n#import \"NYAlertViewController.h\"\n\n// ...\n\n// Set a title and message\nNSString *title = @\"Location Permission\";\nNSString *message = @\"Set the alertViewContentView property to add custom views to the alert view\";\n\n// Customize appearance as desired\nNYAlertViewControllerConfiguration *configuration = [NYAlertViewControllerConfiguration new];\nconfiguration.contentViewInset = UIEdgeInsetsMake(12.0f, 8.0f, 8.0f, 8.0f);\nconfiguration.alertViewBackgroundColor = [UIColor colorWithRed:0.23f green:0.23f blue:0.27f alpha:1.0f];\nconfiguration.separatorColor = [UIColor colorWithRed:0.16f green:0.16f blue:0.2f alpha:1.0f];\nconfiguration.titleTextColor = [UIColor whiteColor];\nconfiguration.messageTextColor = [UIColor whiteColor];\n\nconfiguration.buttonConfiguration = [NYAlertActionConfiguration new];\nconfiguration.buttonConfiguration.titleColor = [UIColor whiteColor];\n\nconfiguration.cancelButtonConfiguration.titleColor = [UIColor whiteColor];\n\n// Set up alert actions\nNYAlertAction *cancelAction = [[NYAlertAction alloc] initWithTitle:@\"Later\"\n                                                             style:UIAlertActionStyleCancel\n                                                           handler:nil];\nNYAlertAction *okAction = [[NYAlertAction alloc] initWithTitle:@\"Ok\"\n                                                         style:UIAlertActionStyleDefault\n                                                       handler:^(NYAlertAction *action) {\n                                                           [self doSomething];\n                                                       }]];\n\nNYAlertViewController *alertViewController = [[NYAlertViewController alloc] initWithOptions:configuration\n                                                                                      title:title\n                                                                                    message:message\n                                                                                    actions:@[cancelAction, okAction]];\n\n// Optionally add a content view\nUIImageView *iconImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@\"MapIcon\"]];\niconImageView.contentMode = UIViewContentModeScaleAspectFit;\n[iconImageView.heightAnchor constraintEqualToConstant:60.0f].active = YES;\nalertViewController.alertViewContentView = iconImageView;\n\n// Present the alert view controller\n[self presentViewController:alertViewController animated:YES completion:nil];\n```\n\n### License\nThis project is released under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnealyoung%2FNYAlertViewController","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnealyoung%2FNYAlertViewController","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnealyoung%2FNYAlertViewController/lists"}