{"id":17329141,"url":"https://github.com/zzzworm/pstcustomalertcontroller","last_synced_at":"2025-06-30T14:07:02.139Z","repository":{"id":149227523,"uuid":"147092237","full_name":"zzzworm/PSTCustomAlertController","owner":"zzzworm","description":" A AlertControler base on PSTAlertController and TYAlertController. ","archived":false,"fork":false,"pushed_at":"2018-09-03T14:48:49.000Z","size":98,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T05:31:40.098Z","etag":null,"topics":["ios","uialertcontroller"],"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/zzzworm.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-02T14:25:43.000Z","updated_at":"2018-12-22T15:29:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"b9d9599a-14b0-4adb-a9e3-ab4265e53f4a","html_url":"https://github.com/zzzworm/PSTCustomAlertController","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zzzworm/PSTCustomAlertController","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzzworm%2FPSTCustomAlertController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzzworm%2FPSTCustomAlertController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzzworm%2FPSTCustomAlertController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzzworm%2FPSTCustomAlertController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zzzworm","download_url":"https://codeload.github.com/zzzworm/PSTCustomAlertController/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzzworm%2FPSTCustomAlertController/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261110603,"owners_count":23111063,"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":["ios","uialertcontroller"],"created_at":"2024-10-15T14:26:19.918Z","updated_at":"2025-06-21T11:06:01.508Z","avatar_url":"https://github.com/zzzworm.png","language":"Objective-C","readme":"PSTCustomAlertController\n==================\n\nA `AlertControler` base on [PSTAlertController](https://github.com/steipete/PSTAlertController) and [TYAlertController](https://github.com/12207480/TYAlertController).\n\n`PSTAlertController` bring a API similar to `UIAlertController` AlertController, and backwards compatible to iOS 7. Will use the new shiny API when you run iOS 8. It use the iOS system UI elements. `TYAlertController` is also a API similar to `UIAlertController` AlertController, but totally use custom UI elements.I'd like bring them together. So I enhanced `PSTAlertController` with custom styles, which you can just chose different sytle to swith between the system or custom UI.    \n\nuse as system AlertControler:\n```\n  PSTAlertController *controller = [PSTAlertController alertControllerWithTitle:nil message:NSLocalizedString(@\"No WIFI connection. Use Cellular data to download?\", nil) preferredStyle:PSTAlertControllerStyleAlert];\n  [controller addAction:[PSTAlertAction actionWithTitle:@\"OK\" style:PSTAlertActionStyleDestructive handler:nil]];\n  // Cancel action on a sheet should be the last action.\n  [controller addCancelActionWithHandler:nil];\n  [controller showInController:self animated:YES completion:nil];\n```\n\nuse as system ActionSheet:\n```\n  PSTAlertController *controller = [PSTAlertController alertControllerWithTitle:NSLocalizedString(@\"Choose connection:\",nil) message:nil preferredStyle:PSTAlertControllerStyleActionSheet];\n  [controller addAction:[PSTAlertAction actionWithTitle:@\"Wifi\" style:PSTAlertActionStyleDefault handler:nil]];\n  [controller addAction:[PSTAlertAction actionWithTitle:@\"3G/4G\" style:PSTAlertActionStyleDefault handler:nil]];\n  // Cancel action on a sheet should be the last action.\n  [controller addCancelActionWithHandler:nil];\n  [controller showInController:self animated:YES completion:nil];\n```\n\nuse as custom AlertControler:\n```\n  PSTAlertController *controller = [PSTAlertController alertControllerWithTitle:nil message:NSLocalizedString(@\"No WIFI connection. Use Cellular data to download?\", nil) preferredStyle:PSTAlertControllerStyleCustomAlert];\n  [controller addAction:[PSTAlertAction actionWithTitle:@\"OK\" style:PSTAlertActionStyleDestructive handler:nil]];\n  // Cancel action on a sheet should be the last action.\n  [controller addCancelActionWithHandler:nil];\n  [controller showInController:self animated:YES completion:nil];\n```\n\nuse as custom ActionSheet:\n```\n  PSTAlertController *controller = [PSTAlertController actionSheetWithTitle:NSLocalizedString(@\"Choose connection:\",nil) message:nil preferredStyle:PSTAlertControllerStyleCustomActionSheet ];\n  [controller addAction:[PSTAlertAction actionWithTitle:@\"Wifi\" style:PSTAlertActionStyleDefault handler:nil]];\n  [controller addAction:[PSTAlertAction actionWithTitle:@\"3G/4G\" style:PSTAlertActionStyleDefault handler:nil]];\n  // Cancel action on a sheet should be the last action.\n  [controller addCancelActionWithHandler:nil];\n  [controller showInController:self animated:YES completion:nil];\n```\n\n## Compatbility\n\nTested with iOS 7-9, Xcode 7 and ARC.\n\n## License\n\nMIT, see LICENSE file.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzzzworm%2Fpstcustomalertcontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzzzworm%2Fpstcustomalertcontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzzzworm%2Fpstcustomalertcontroller/lists"}