{"id":13743353,"url":"https://github.com/ole/OBShapedButton","last_synced_at":"2025-05-09T01:30:42.311Z","repository":{"id":695796,"uuid":"340490","full_name":"ole/OBShapedButton","owner":"ole","description":"A UIButton subclass that works with for non-rectangular button shapes.","archived":false,"fork":false,"pushed_at":"2021-05-03T11:21:17.000Z","size":226,"stargazers_count":945,"open_issues_count":1,"forks_count":146,"subscribers_count":48,"default_branch":"main","last_synced_at":"2024-10-14T02:35:54.641Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://oleb.net/blog/2009/10/obshapedbutton-non-rectangular-buttons-on-the-iphone/","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/ole.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-10-17T15:06:56.000Z","updated_at":"2024-10-12T12:17:56.000Z","dependencies_parsed_at":"2022-07-07T15:01:01.276Z","dependency_job_id":null,"html_url":"https://github.com/ole/OBShapedButton","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/ole%2FOBShapedButton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ole%2FOBShapedButton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ole%2FOBShapedButton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ole%2FOBShapedButton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ole","download_url":"https://codeload.github.com/ole/OBShapedButton/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253174186,"owners_count":21865827,"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-08-03T05:00:45.147Z","updated_at":"2025-05-09T01:30:41.881Z","avatar_url":"https://github.com/ole.png","language":"Objective-C","readme":"OBShapedButton\n==============\n\nOBShapedButton is a UIButton subclass optimized for non-rectangular button shapes.\nInstances of OBShapedButton respond to touches only in areas where the image that is\nassigned to the button for UIControlStateNormal is non-transparent.\n\n \nHow to Install\n--------------\n\n### Installation via CocoaPods\n\nIf possible, you should install `OBShapedButton` via [CocoaPods](http://cocoapods.org):\n\n    $ edit Podfile\n    platform :ios\n    pod 'OBShapedButton'\n\n### Manual Installation\n\nIf you cannot use CocoaPods for whatever reason, manually add OBShapedButton.h, OBShapedButton.m, UIImage+ColorAtPixel.h, and UIImage+ColorAtPixel.m to your Xcode project.\n\n\nUsage\n-----\n\n* Design your UI in Interface Builder with UIButtons as usual. Set the Button type to Custom\n  and provide transparent PNG images for the different control states as needed.\n* In the Identity Inspector in Interface Builder, set the Class of the button to `OBShapedButton`.\n  That's it! Your button will now only respond to touches where the PNG image for the normal\n  control state is non-transparent.\n\n\nCredits\n-------\nWritten by Ole Begemann, ole@oleb.net  \nhttp://oleb.net/blog/2009/10/obshapedbutton-non-rectangular-buttons-on-the-iphone/  \nOctober, 2009\n\nCorrected some serious bugs in April 2011. Thanks to the commenters on my blog and those who \nposted issues on GitHub for pointing them out, including the fixes.\n\nContributors:\n\n* [balabhadra](https://github.com/balabhadra) added support for background images.\n* [yurkins](https://github.com/yurkins) fixed an issue that only occurred in release builds.\n* [Steven Zweier](https://github.com/SteveZz) fixed an issue that would intermittently result in wrong hit tests.\n* [jvanakker](https://github.com/jvanakker) fixed an issue with images that had a different size than the button.\n\n\nMIT License\n-----------\nCopyright (c) 2009 Ole Begemann\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\nall copies 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\nTHE SOFTWARE.\n","funding_links":[],"categories":["Objective-C  Stars 1000以内排名整理","Objective-C","etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fole%2FOBShapedButton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fole%2FOBShapedButton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fole%2FOBShapedButton/lists"}