{"id":19439790,"url":"https://github.com/mishadovhiy/alertviewlibrary","last_synced_at":"2026-06-19T05:32:44.848Z","repository":{"id":37756564,"uuid":"500588335","full_name":"mishadovhiy/AlertViewLibrary","owner":"mishadovhiy","description":"Swift package to display Loading indicator or Alert (UIView)","archived":false,"fork":false,"pushed_at":"2023-12-28T08:48:45.000Z","size":233,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-10T15:38:34.240Z","etag":null,"topics":["package-dependency","swift","uikit","uiwindow","xib"],"latest_commit_sha":null,"homepage":"https://mishadovhiy.com/#AlertLib","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mishadovhiy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-06-06T20:45:41.000Z","updated_at":"2023-12-28T08:31:30.000Z","dependencies_parsed_at":"2022-08-19T02:10:57.550Z","dependency_job_id":"fef8a8e8-56a9-4e5f-86c2-e336cb2d61b0","html_url":"https://github.com/mishadovhiy/AlertViewLibrary","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishadovhiy%2FAlertViewLibrary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishadovhiy%2FAlertViewLibrary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishadovhiy%2FAlertViewLibrary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishadovhiy%2FAlertViewLibrary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mishadovhiy","download_url":"https://codeload.github.com/mishadovhiy/AlertViewLibrary/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232944482,"owners_count":18600531,"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":["package-dependency","swift","uikit","uiwindow","xib"],"created_at":"2024-11-10T15:26:46.338Z","updated_at":"2026-06-19T05:32:44.822Z","avatar_url":"https://github.com/mishadovhiy.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AlertViewLibrary\n\n\u003cdiv style=\"display:flex;flex-direction: row;\"\u003e\n\n\u003cimg src=\"https://github.com/mishadovhiy/AlertViewLibrary/assets/44978117/4528b64f-7b93-48c6-b90f-c1a784995cf9\" width=\"45%\"\u003e\n\u003cimg src=\"https://github.com/mishadovhiy/AlertViewLibrary/assets/44978117/61b6ca7f-a91b-434b-94fe-de278a0d8ef59\" width=\"45%\"\u003e\n\n\u003c/div\u003e\n\n# Compatibility\n- iOS 11 and higher\n- MacOS 10.15 and higher\n\n# Installation\n### Add AlertViewLibrary Package Dependency to your project\n\u003cimg width=\"862\" alt=\"Screenshot 2023-12-25 at 03 03 42\" src=\"https://github.com/mishadovhiy/AlertViewLibrary/assets/44978117/27f8e18a-0ae1-4cd0-af13-d003bfb81dbd\"\u003e\n\n\u003cp\u003e\u003cbr\u003e\u003cbr\u003e\u003c/p\u003e\n\n### \u003cp\u003e\u003cb\u003eSearch for\u003c/b\u003e: \u003ca href=\"https://github.com/mishadovhiy/AlertViewLibrary\"\u003ehttps://github.com/mishadovhiy/AlertViewLibrary\u003c/a\u003e\u003c/p\u003e\n\u003cimg width=\"1278\" alt=\"Screenshot 2023-12-25 at 03 04 25\" src=\"https://github.com/mishadovhiy/AlertViewLibrary/assets/44978117/a6ace39a-ae5a-4a28-a945-5ef0b4024184\"\u003e\n\n\n\n# Usage\n## Initialization\n### Import Library\n```\nimport AlertViewLibrary\n```\n### Initialize Library\n```\nlazy var alert:AlertManager = .init()\n```\n\u003cp\u003e// performs instantialization of UIView from xib\u003c/p\u003e\n\nDone! And now you can use the Library\n## Basic Usage Examples\n\u003cdiv style=\"display:flex;flex-direction: row;\"\u003e\n\n\u003cimg src=\"https://github.com/mishadovhiy/AlertViewLibrary/assets/44978117/67196cbf-f216-4b2a-a5b3-48a782ddc874\" width=\"35%\"\u003e\n\u003cimg src=\"https://github.com/mishadovhiy/AlertViewLibrary/assets/44978117/86d540c8-1dcb-4094-b08b-4e8099c39840\" width = \"30%\"\u003e\n\u003cimg src=\"https://github.com/mishadovhiy/AlertViewLibrary/assets/44978117/125d72c7-8656-4d92-9443-cf3c10013b0d\" width =\"30%\"\u003e\n\n\u003c/div\u003e\n\n### Show Loading indicator\n```\nalert.showLoading(description: \"Your loading description\")\n```\n\u003cp\u003e// Adds self (UIView) to UIWindow of active UIScene\u003c/p\u003e\n\n### Show Alert\n```\nalert.showAlert(title: \"Your Title\", description: \"Your Description\", appearence: .with({\n    $0.image = .image(.init(named: \"screen1\")!)\n}))\n```\n\u003cp\u003e// Adds self (UIView) to UIWindow of active UIScene\u003c/p\u003e\n\n### Alert Types\n\n\n\nhttps://github.com/mishadovhiy/AlertViewLibrary/assets/44978117/662eb63e-11e4-4b16-a1d8-937e0b197c8b\n\n\n\n\n```\nalert.showAlert(title: nil, appearence: .type(.error))\n```\n\n\u003cp\u003eappearence: Declared in \u003ca href=\"https://github.com/mishadovhiy/AlertViewLibrary/blob/main/Sources/AlertViewLibrary/AlertViewLibrary/Extensions_AlertViewLibrary.swift#L74\" target=\"blank\"\u003ehttps://github.com/mishadovhiy/AlertViewLibrary/blob/main/Sources/AlertViewLibrary/AlertViewLibrary/Extensions_AlertViewLibrary.swift#L74\u003c/a\u003e\u003c/p\u003e\n\n#### ViewType\nprimary types:\n- error\n- standard (default)\n- succsess\n\u003cp\u003eNote: \u003csmall\u003e\u003cb\u003e.error\u003c/b\u003e and \u003cb\u003e.success\u003c/b\u003e types are setting default title (when alert title is nill) and default image\u003c/small\u003e\u003cbr\u003e\ndefault image or title can be setted when initializing AlertManager\u003c/p\u003e\n\nTo Show error or success without default image, set\n```\nalert.showAlert(title: nil, appearence: .with({\n    $0.type = .error\n    $0.image = AlertViewLibrary.AIImage.none\n}))\n```\n\nAnd you can set primary and secondary button (with type, title and completion handler)\nif primaryButton or secondaryButton is not initialized in showAlert method - would be displayed single ok button that hides an alert (default ok title text could be setted when initializing the Library)\n\n\n# Customization\n\n![customAlert](https://github.com/mishadovhiy/AlertViewLibrary/assets/44978117/ecc32cd9-7c90-48a5-9a74-154a30d2be2c)\n\n\n```\nAlertManager.init(appearence:.with({\n    $0.colors = .with({\n        $0.alertState = .with({\n            $0.view = blue\n            $0.background = .black.withAlphaComponent(0.5)\n        })\n        $0.activityState = .with({\n            $0.view = orange.withAlphaComponent(0.8)\n            $0.background = .black.withAlphaComponent(0.1)\n        })\n        $0.texts = .with({\n            $0.title = .black\n            $0.description = .black.withAlphaComponent(0.5)\n        })\n        $0.buttom = .with({\n            $0.link = .black\n            $0.normal = .gray\n        })\n    })\n    $0.animations = .with({\n        $0.setBackground = 0.8\n        $0.alertShow = 0.5\n        $0.performHide1 = 0.5\n        $0.performHide2 = 0.3\n        $0.loadingShow1 = 0.4\n        $0.loadingShow2 = 0.5\n    })\n    $0.images = .with({\n        $0.alertError = nil\n        $0.alertSuccess = nil\n    })\n}))\n```\nAppearence declaration: https://github.com/mishadovhiy/AlertViewLibrary/blob/main/Sources/AlertViewLibrary/Model/AIAppearence.swift#L10\n\u003cp\u003eAll parameters are optional\u003c/p\u003e\n\n\n\u003cdiv style=\"display:flex;flex-direction: row;\"\u003e\n\n\u003cimg src=\"https://github.com/mishadovhiy/AlertViewLibrary/assets/44978117/5e8fa7ad-b873-41eb-ae41-33faff514874\" width=\"45%\"\u003e\n\u003cimg src=\"https://github.com/mishadovhiy/AlertViewLibrary/assets/44978117/adab9d13-b696-43ef-ae78-6d76bfe3176e\" width=\"45%\"\u003e\n\n\u003c/div\u003e\n\n\n# Features\n- Manages unseen alerts\nWhen Alert View is presenting - all new alerts would be added to the query and would be presented later\n- Customize animation, default texts, default images, colors, layer (corner radius, etc)\n  \n# Usage example in apps\n- Budget Tracker App https://github.com/mishadovhiy/Budget-Tracker/blob/master/Budget%20Tracker/AppDelegate/AppDelegate.swift#L31\n- Random Moview App https://github.com/mishadovhiy/randomMovie/blob/main/MovieList/Model/TestAlert.swift#L11\n\n\u003cp\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003eCreated by \u003ca href=\"https://www.mishadovhiy.com\"\u003eMisha Dovhiy\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmishadovhiy%2Falertviewlibrary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmishadovhiy%2Falertviewlibrary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmishadovhiy%2Falertviewlibrary/lists"}