{"id":13696441,"url":"https://github.com/yulingtianxia/TBActionSheet","last_synced_at":"2025-05-03T17:31:10.486Z","repository":{"id":45694464,"uuid":"48269574","full_name":"yulingtianxia/TBActionSheet","owner":"yulingtianxia","description":"A Custom\u0026Powerful Action Sheet For iOS. 一个 ActionSheet 满足所有样式！超高自由度的可定制！","archived":false,"fork":false,"pushed_at":"2022-09-14T12:13:07.000Z","size":46515,"stargazers_count":950,"open_issues_count":5,"forks_count":94,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-04-12T14:56:31.814Z","etag":null,"topics":["actionsheet","autorotation","carthage","cocoapods","ios","ios-thirdparty","ios-ui","objective-c","qq","wechat"],"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/yulingtianxia.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":"2015-12-19T05:21:59.000Z","updated_at":"2025-03-04T12:24:33.000Z","dependencies_parsed_at":"2022-07-15T11:18:47.783Z","dependency_job_id":null,"html_url":"https://github.com/yulingtianxia/TBActionSheet","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yulingtianxia%2FTBActionSheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yulingtianxia%2FTBActionSheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yulingtianxia%2FTBActionSheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yulingtianxia%2FTBActionSheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yulingtianxia","download_url":"https://codeload.github.com/yulingtianxia/TBActionSheet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252226693,"owners_count":21714849,"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":["actionsheet","autorotation","carthage","cocoapods","ios","ios-thirdparty","ios-ui","objective-c","qq","wechat"],"created_at":"2024-08-02T18:00:40.210Z","updated_at":"2025-05-03T17:31:10.089Z","avatar_url":"https://github.com/yulingtianxia.png","language":"Objective-C","funding_links":[],"categories":["UI Components"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/yulingtianxia/TBActionSheet\"\u003e\n\u003cimg src=\"images/logo.png\" alt=\"TBActionSheet\" /\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n[![CI Status](http://img.shields.io/travis/yulingtianxia/TBActionSheet.svg?style=flat)](https://travis-ci.org/yulingtianxia/TBActionSheet)\n[![Version](https://img.shields.io/cocoapods/v/TBActionSheet.svg?style=flat)](http://cocoapods.org/pods/TBActionSheet)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![License](https://img.shields.io/cocoapods/l/TBActionSheet.svg?style=flat)](http://cocoapods.org/pods/TBActionSheet)\n[![Platform](https://img.shields.io/cocoapods/p/TBActionSheet.svg?style=flat)](http://cocoapods.org/pods/TBActionSheet)\n[![CocoaPods](https://img.shields.io/cocoapods/dt/TBActionSheet.svg)](http://cocoapods.org/pods/TBActionSheet)\n[![CocoaPods](https://img.shields.io/cocoapods/at/TBActionSheet.svg)](http://cocoapods.org/pods/TBActionSheet)\n[![Twitter Follow](https://img.shields.io/twitter/follow/yulingtianxia.svg?style=social\u0026label=Follow)](https://twitter.com/yulingtianxia)\n\n# TBActionSheet\n\nTBActionSheet is a small library that allows you to substitute Apple's uncustomizable `UIActionSheet`, with a beautiful and totally customizable actionsheet that you can use in your iOS app. The default style is iOS9/10, you can make your own style. Enjoy!  \n\nHere are some pictures showing TBActionSheet's powerful individuation. You can change UI dynamically:\n\n![](images/demo.gif)\n![](images/addButton.gif)\n\nBTW, `TBActionSheet` also supports **CUSTOM ANIMATION**!\n\n## 🌟 Feature\n\n- [x] Title\n- [x] Description message\n- [x] Insert a custom view at anywhere\n- [x] Custom animation.\n- [x] Customizations: fonts, colors, dimensions, corners \u0026 more\n- [x] Closure when a button or background is pressed\n- [x] Similar implementation to UIActionSheet\n- [x] Add button using block syntax\n- [x] Scroll the whole action sheet.\n- [x] Blur Effect under iOS7\n- [x] Autorotation under iOS8\n- [x] CocoaPods\n- [x] Carthage\n\n## 📚 Article\n\n- [自制一款强大的 ActionSheet](http://yulingtianxia.com/blog/2016/07/18/TBActionSheet/)\n- [腾讯实习第一个月工作总结](http://yulingtianxia.com/blog/2015/11/13/Summary-of-the-first-month-in-the-internship-of-Tencent/)\n\n## 🔮 Example\n\nTo run the example project, clone the repo and run MTDemo target.\n\n## 💰 Requirement\n\n- iOS 7.0+ (iOS 8.0+ full features supported)\n- Xcode 10.1+\n\n## 📲 Installation\n\n### CocoaPods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:\n\n```bash\n$ gem install cocoapods\n```\n\nTo integrate TBActionSheet into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n\n```\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '9.0'\nuse_frameworks!\ntarget 'MyApp' do\n\tpod 'TBActionSheet'\nend\n```\n\nYou need replace \"MyApp\" with your project's name.\n\nThen, run the following command:\n\n```bash\n$ pod install\n```\n\n### Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nYou can install Carthage with [Homebrew](http://brew.sh/) using the following command:\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\nTo integrate TBActionSheet into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"yulingtianxia/TBActionSheet\"\n```\n\nRun `carthage update` to build the framework and drag the built `TBActionSheetKit.framework` into your Xcode project.\n\n### Manual\n\nJust drag the \"Source\" document folder into your project.\n\n## 🐒 Usage\n\n### TLDR\n\nYou can refer to 'ViewController.m' in the TBAlertControllerDemo project.The base usage is same as 'UIActionSheet'.\n\nTo let TBActionSheet looks like WeChat style, you can set these properties of `TBActionShet` or it's `UIAppearance` like this :\n\n```\nsheetWidth = MIN(kScreenWidth, kScreenHeight);\nbackgroundTransparentEnabled = NO;\nrectCornerRadius = 0;\n``` \n\n### More than what you want\n\nThe base usage is same to `UIActionSheet`. You can just replace `UIActionSheet` with `TBActionSheet`. If you want to customize your action sheet, just configure some properties. \n\n[GitHub wiki](https://github.com/yulingtianxia/TBActionSheet/wiki) can help you master advanced usage.\n\nThere is also an example project for `TBActionSheet`.\n\n## TBAlertController\n\nThis repo also include `TBAlertController`, which unifies `UIAlertController`, `UIAlertView`, and `UIActionSheet`. `TBAlertController` will use `UIAlertController` on iOS 8.2 and later. On the contrary, it will use `UIAlertView` or `UIActionSheet`.\n\nThe API Usage of `TBAlertController` is similar to `UIAlertController`. I also provide `TBAlertAction` instead of `UIAlertAction`.\n\nThere is an example:\n\n```\nTBAlertController *controller = [TBAlertController alertControllerWithTitle:@\"TBAlertController\" message:@\"AlertStyle\" preferredStyle:TBAlertControllerStyleAlert];\nTBAlertAction *clickme = [TBAlertAction actionWithTitle:@\"点我\" style: TBAlertActionStyleDefault handler:^(TBAlertAction * _Nonnull action) {\n    NSLog(@\"%@\",action.title);\n}];\nTBAlertAction *cancel = [TBAlertAction actionWithTitle:@\"取消\" style: TBAlertActionStyleCancel handler:^(TBAlertAction * _Nonnull action) {\n    NSLog(@\"%@\",action.title);\n}];\n[controller addAction:clickme];\n[controller addAction:cancel];\n[self presentViewController:controller animated:YES completion:nil];\n```\n\nFor more infomation about `TBAlertController`, please visit [this post](http://yulingtianxia.com/blog/2015/11/13/Summary-of-the-first-month-in-the-internship-of-Tencent/) of my blog.\n\n## ❤️ Contributed\n\n- If you **need help** or you'd like to **ask a general question**, open an issue.\n- If you **found a bug**, open an issue.\n- If you **have a feature request**, open an issue.\n- If you **want to contribute**, submit a pull request.\n\n## 👨🏻‍💻 Author\n\nyulingtianxia, yulingtianxia@gmail.com\n\n## 👮🏻 License\n\nTBActionSheet is available under the MIT license. See the LICENSE file for more info.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyulingtianxia%2FTBActionSheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyulingtianxia%2FTBActionSheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyulingtianxia%2FTBActionSheet/lists"}