{"id":21437610,"url":"https://github.com/gabrieltheodoropoulos/ios-customizedalertview","last_synced_at":"2025-07-01T03:35:37.808Z","repository":{"id":15758829,"uuid":"18497610","full_name":"gabrieltheodoropoulos/iOS-CustomizedAlertView","owner":"gabrieltheodoropoulos","description":"A simple iOS class for using UIAlertView with a completion handler, instead of delegate methods.","archived":false,"fork":false,"pushed_at":"2014-04-06T19:40:46.000Z","size":120,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T23:42:23.214Z","etag":null,"topics":[],"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/gabrieltheodoropoulos.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}},"created_at":"2014-04-06T19:39:28.000Z","updated_at":"2014-04-13T00:35:57.000Z","dependencies_parsed_at":"2022-09-24T03:52:07.436Z","dependency_job_id":null,"html_url":"https://github.com/gabrieltheodoropoulos/iOS-CustomizedAlertView","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gabrieltheodoropoulos/iOS-CustomizedAlertView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrieltheodoropoulos%2FiOS-CustomizedAlertView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrieltheodoropoulos%2FiOS-CustomizedAlertView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrieltheodoropoulos%2FiOS-CustomizedAlertView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrieltheodoropoulos%2FiOS-CustomizedAlertView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabrieltheodoropoulos","download_url":"https://codeload.github.com/gabrieltheodoropoulos/iOS-CustomizedAlertView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrieltheodoropoulos%2FiOS-CustomizedAlertView/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262889301,"owners_count":23380201,"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-11-23T00:27:46.984Z","updated_at":"2025-07-01T03:35:37.763Z","avatar_url":"https://github.com/gabrieltheodoropoulos.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Description ##\n\nThe **GTAlertView** class for iOS, provides a way for using the UIAlertView with a completion handler block, instead of delegate methods. With it, initialiazing and showing the alert view, as well as handling the tapped buttons are implemented all together in one place. Therefore, there is no more need to adopt the UIAlertViewDelegate protocol and implement delegate methods. Further than that, two more features are provided: To show a single message with a one button using a class method (no object initialization required), and a convenient way to present a buttonless alert view. \n\n\n## Usage ##\n\nFirst of all, the GTAlertView class must be imported to the class that is about to be used:\n\n    #import \"GTAlertView.h\"\n\n\nTo show a normal alert view using a completion handler:\n\n1. Declare either a public or a private object of the GTAlertView class.\n2. Initialize it using the \u003ccode\u003einitWithTitle:message:cancelButtonTitle:otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION\u003c/code\u003e init method of the GTAlertView class.\n3. Show it and handle the tapped buttons using the \u003ccode\u003eshowWithCompletionHandler:\u003c/code\u003e method.\n\nThe completion handler returns the tapped button title and index.\n\n\nTo show a single message with one button only using the provided class method, just call the \u003ccode\u003eshowAlertViewWithTitle:andMessage:andDoneButtonTitle:\u003c/code\u003e as follows:\n\n    [GTAlertView showAlertViewWithTitle:@\"ALERT_TITLE\"  andMessage:@\"ALERT_MESSAGE\"  andDoneButtonTitle:@\"ALERT_BUTTON_TITLE\"];\n\n\nFinally, to present a buttonless alert view:\n\n1. Declare either a public or a private object of the GTAlertView class.\n2. Initialize it using the normal init method (\u003ccode\u003eself.alertObject = [[GTAlertView alloc] init]\u003c/code\u003e).\n3. Call the \u003ccode\u003eshowButtonLessAlertViewWithTitle:andMessage:\u003c/code\u003e method to show it.\n4. To dismiss it, just call the \u003ccode\u003ehideButtonLessAlertView\u003c/code\u003e method.\n\n\nSee the sample app provided for examples.\n\n\n## Notes ##\n\n1. In the GTAlertView class, only the \u003ccode\u003ealertView:clickedButtonAtIndex:\u003c/code\u003e delegate method is implemented.\n\n2. Currently, only single text alert views can be displayed using this class. Support for other styles (such as textfield or login alert views) will be added to a future update.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrieltheodoropoulos%2Fios-customizedalertview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabrieltheodoropoulos%2Fios-customizedalertview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrieltheodoropoulos%2Fios-customizedalertview/lists"}