{"id":13463448,"url":"https://github.com/a1anyip/AYVibrantButton","last_synced_at":"2025-03-25T06:32:05.092Z","repository":{"id":19039208,"uuid":"22263966","full_name":"a1anyip/AYVibrantButton","owner":"a1anyip","description":"A stylish button with iOS 8 vibrancy effect","archived":false,"fork":false,"pushed_at":"2016-10-09T10:31:50.000Z","size":1017,"stargazers_count":1138,"open_issues_count":10,"forks_count":66,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-10-15T10:05:08.192Z","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/a1anyip.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":"2014-07-25T16:51:20.000Z","updated_at":"2024-06-25T04:45:53.000Z","dependencies_parsed_at":"2022-09-25T04:00:52.647Z","dependency_job_id":null,"html_url":"https://github.com/a1anyip/AYVibrantButton","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a1anyip%2FAYVibrantButton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a1anyip%2FAYVibrantButton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a1anyip%2FAYVibrantButton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a1anyip%2FAYVibrantButton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a1anyip","download_url":"https://codeload.github.com/a1anyip/AYVibrantButton/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222045611,"owners_count":16921982,"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-07-31T13:00:53.708Z","updated_at":"2024-10-29T12:31:25.012Z","avatar_url":"https://github.com/a1anyip.png","language":"Objective-C","funding_links":[],"categories":["etc","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"AYVibrantButton\n===============\n\nAYVibrantButton is a stylish button with iOS 8 vibrancy effect. It is a subclass of `UIButton` that has a simple yet elegant appearance and built-in support for `UIVisualEffectView` and `UIVibrancyEffect` classes introduced in iOS 8. Yet, it can be used on iOS 7 without the vibrancy effect.\n\n![Screenshot](https://github.com/a1anyip/AYVibrantButton/blob/master/Readme/screenshot.png?raw=true)\n\n## Configurations\n\nVibrant buttons can be configured with one of the three supported button styles, **invert**, **translucent** and **fill** (see examples below).\n\nSome basic properties like **icon**, **text**, **font**, **alpha**, **corner radius**, **border width** and **background color** (for no vibrancy effect) can all be changed easily.\n\nThe default vibrancy effect is for blur effect `UIBlurEffectStyleLight`. It could be set to any `UIVibrancyEffect` instance. For today extensions, it should be set to `[UIVibrancyEffect notificationCenterVibrancyEffect]`.\n\n## Note\n\nThough vibrant buttons can be placed anywhere, it is recommended that vibrant buttons with vibrancy effects should be placed in the `contentView` of `UIVisualEffectView` (except in today view).\n\n`UIVisualEffectView` can be created as follows.\n\n```objective-c\nUIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight]];\neffectView.frame = self.view.bounds;\n[self.view addSubview:effectView];\n```\n\n## Installation\n\n### CocoaPods\n\nAdd the following line to the `Podfile`.\n\n```\npod \"AYVibrantButton\"\n```\n\n### Manual Installation\n\nSimply add `AYVibrantButton.h` and `AYVibrantButton.m` to your project.\n\n## Examples\n\nThe following images show the normal and highlighted (being pressed) button appearances.\n\n### Invert style with vibrancy effect\n\n![Invert Dark](https://github.com/a1anyip/AYVibrantButton/blob/master/Readme/invert2-dark.gif?raw=true)\n![Invert Extra Light](https://github.com/a1anyip/AYVibrantButton/blob/master/Readme/invert2-extralight.gif?raw=true)\n\n![Invert Dark](https://github.com/a1anyip/AYVibrantButton/blob/master/Readme/invert-dark.gif?raw=true)\n![Invert Extra Light](https://github.com/a1anyip/AYVibrantButton/blob/master/Readme/invert-extralight.gif?raw=true)\n\n````objective-c\nAYVibrantButton *invertButton = [[AYVibrantButton alloc] initWithFrame:CGRectZero style:AYVibrantButtonStyleInvert];\ninvertButton.vibrancyEffect = [UIVibrancyEffect effectForBlurEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight]];\ninvertButton.text = @\"Invert\";\ninvertButton.font = [UIFont systemFontOfSize:18.0];\n[effectView.contentView addSubview:invertButton];\n```\n\n### Translucent style with vibrancy effect\n\n![Translucent Dark](https://github.com/a1anyip/AYVibrantButton/blob/master/Readme/translucent-dark.gif?raw=true)\n![Translucent Extra Light](https://github.com/a1anyip/AYVibrantButton/blob/master/Readme/translucent-extralight.gif?raw=true)\n\n````objective-c\nAYVibrantButton *translucentButton = [[AYVibrantButton alloc] initWithFrame:CGRectZero style:AYVibrantButtonStyleTranslucent];\ntranslucentButton.vibrancyEffect = [UIVibrancyEffect effectForBlurEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight]];\ntranslucentButton.text = @\"Translucent\";\ntranslucentButton.font = [UIFont systemFontOfSize:18.0];\n[effectView.contentView addSubview:translucentButton];\n```\n\n### Translucent style without vibrancy effect\n\n![Translucent Dark](https://github.com/a1anyip/AYVibrantButton/blob/master/Readme/anycolor-dark.gif?raw=true)\n![Translucent Extra Light](https://github.com/a1anyip/AYVibrantButton/blob/master/Readme/anycolor-extralight.gif?raw=true)\n\n````objective-c\nAYVibrantButton *button = [[AYVibrantButton alloc] initWithFrame:CGRectZero style:AYVibrantButtonStyleTranslucent];\nbutton.vibrancyEffect = nil;\nbutton.text = @\"Any Color\";\nbutton.font = [UIFont systemFontOfSize:18.0];\nbutton.tintColor = [UIColor blackColor];\n[effectView.contentView addSubview:button];\n```\n\n## Changelog\n\n### 1.0.4\n* Added `invertAlphaHighlighted` property\n* Changed the super class from `UIButton` to `UIControl`\n* Changed `backgroundColor` to `tintColor`\n\n### 1.0.3\n* Added a new button style `AYVibrantButtonStyleFill`\n* Fixed an issue that setting button alpha removes the vibrancy effect\n\n### 1.0.2\n* Support setting icon image\n\n## Creator\n\n**Alan Yip**\n* [http://alanyip.me](http://alanyip.me)\n* [@tweakcc](https://twitter.com/tweakcc)\n\n## License\n```\nThe MIT License (MIT)\n\nCopyright (c) 2014 Alan Yip\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa1anyip%2FAYVibrantButton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa1anyip%2FAYVibrantButton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa1anyip%2FAYVibrantButton/lists"}