{"id":15032350,"url":"https://github.com/kciter/floaty","last_synced_at":"2025-05-15T03:07:34.584Z","repository":{"id":44846839,"uuid":"44174933","full_name":"kciter/Floaty","owner":"kciter","description":":heart: Floating Action Button for iOS","archived":false,"fork":false,"pushed_at":"2022-08-25T01:50:46.000Z","size":8712,"stargazers_count":1584,"open_issues_count":59,"forks_count":307,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-05-08T18:15:29.723Z","etag":null,"topics":["floatingactionbutton","swift","ui-components"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/kciter.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["kciter"]}},"created_at":"2015-10-13T12:32:42.000Z","updated_at":"2025-05-07T05:21:45.000Z","dependencies_parsed_at":"2022-07-19T18:03:39.321Z","dependency_job_id":null,"html_url":"https://github.com/kciter/Floaty","commit_stats":null,"previous_names":["kciter/kcfloatingactionbutton"],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kciter%2FFloaty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kciter%2FFloaty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kciter%2FFloaty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kciter%2FFloaty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kciter","download_url":"https://codeload.github.com/kciter/Floaty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254264769,"owners_count":22041794,"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":["floatingactionbutton","swift","ui-components"],"created_at":"2024-09-24T20:18:08.216Z","updated_at":"2025-05-15T03:07:29.542Z","avatar_url":"https://github.com/kciter.png","language":"Swift","readme":"# Floaty\n![Swift 5.0](https://img.shields.io/badge/Swift-5.0-orange.svg)\n[![Version](https://img.shields.io/cocoapods/v/Floaty.svg?style=flat)](https://cocoapods.org/pods/floaty)\n[![License](https://img.shields.io/cocoapods/l/Floaty.svg?style=flat)](https://cocoapods.org/pods/floaty)\n[![Platform](https://img.shields.io/cocoapods/p/Floaty.svg?style=flat)](https://cocoapods.org/pods/floaty)\n[![Build Status](https://travis-ci.org/kciter/Floaty.svg?branch=master)](https://travis-ci.org/kciter/Floaty)\n\nFloaty is simple floating action button for iOS. (formerly KCFloatingActionButton)\n\u003e Why change the name?\n\u003e 1. Follow the swift naming convention.\n\u003e 2. `KCFloatingActionButton` is too long.\n\n## Preview\n\u003cimg src=\"https://github.com/kciter/Floaty/raw/master/Images/preview.gif\" width='187' alt=\"Preview gif\"\u003e\n\n## Requirements\n* iOS 10.0+\n* Swift 5.0\n\n## Installation\n### CocoaPods\n```ruby\nuse_frameworks!\npod 'Floaty', '~\u003e 4.2.0'\n```\n### Carthage\n```ruby\ngithub \"kciter/Floaty\"\n```\n\n### Swift Package Manager\nOnce you have your Swift package set up, adding Floaty as a dependency is as easy as adding it to the dependencies value of your `Package.swift`.\n```swift\ndependencies: [\n    .package(url: \"https://github.com/kciter/Floaty.git\", from: \"4.2.1\")\n]\n```\n\n### Manually\nTo install manually the Floaty in an app, just drag the `Floaty/*.swift` file into your project.\n\n## Usage\n### Storyboard support\n\u003cimg src=\"https://github.com/kciter/Floaty/raw/master/Images/storyboard_support1.png\" height='300' alt=\"Storyboard support1\"\u003e\n\u003cimg src=\"https://github.com/kciter/Floaty/raw/master/Images/storyboard_support2.png\" height='300' alt=\"Storyboard support2\"\u003e\n\n### Dependent on the UIWindow.\n```swift\nFloaty.global.button.addItem(title: \"Hello, World!\")\nFloaty.global.show()\n```\n\u003cimg src=\"https://github.com/kciter/Floaty/raw/master/Images/dependent_on_uiwindow.gif\" width='187' alt=\"Dependent on the UIWindow\"\u003e\n\n### Dependent on the UIViewController.\n```swift\nlet floaty = Floaty()\nfloaty.addItem(title: \"Hello, World!\")\nself.view.addSubview(floaty)\n```\n\u003cimg src=\"https://github.com/kciter/Floaty/raw/master/Images/dependent_on_uiviewcontroller.gif\" width='187' alt=\"Dependent on the UIViewController\"\u003e\n\n### Use icon\n```swift\nlet floaty = Floaty()\nfloaty.addItem(\"Hello, World!\", icon: UIImage(named: \"icon\")!)\nself.view.addSubview(floaty)\n```\n\u003cimg src=\"https://github.com/kciter/Floaty/raw/master/Images/icon.png\" width='187' alt=\"Use icon\"\u003e\n\n### Use handler\n#### Swift\n```swift\nlet floaty = Floaty()\nfloaty.addItem(\"I got a handler\", icon: UIImage(named: \"icon\")!, handler: { item in\n    let alert = UIAlertController(title: \"Hey\", message: \"I'm hungry...\", preferredStyle: .alert)\n    alert.addAction(UIAlertAction(title: \"Me too\", style: .default, handler: nil))\n    self.present(alert, animated: true, completion: nil)\n    floaty.close()\n})\nself.view.addSubview(floaty)\n```\n\u003cimg src=\"https://github.com/kciter/Floaty/raw/master/Images/handler.gif\" width='187' alt=\"Use handler\"\u003e\n\n### Use custom item\n```swift\nlet item = FloatyItem()\nitem.buttonColor = UIColor.blueColor()\nitem.title = \"Custom item\"\nFloaty.global.button.addItem(item: item)\n```\n\u003cimg src=\"https://github.com/kciter/Floaty/raw/master/Images/custom_item.png\" width='187' alt=\"Use custom item\"\u003e\n\n\n### RTL Support\nYou can use the `rtlMode` property to mirror the Floaty Button for rtl languages.\n```swift\nFloaty.global.rtlMode = true\n```\n\u003cimg src=\"https://github.com/divgunsingh/Floaty/raw/master/Images/rtl_enabled.png\" width='187' alt=\"Rtl Enabled\"\u003e \u003cimg src=\"https://github.com/divgunsingh/Floaty/raw/master/Images/rtl_disabled.png\" width='187' alt=\"Rtl Disabled\"\u003e\n\n\n\n### Sticky\nYou can use the `sticky` property.\n```swift\nfloaty.sticky = true // sticking to parent UIScrollView(also UITableView, UICollectionView)\nscrollView.addSubview(floaty)\n```\n\n### Friendly Tap\nYou can use the `friendlyTap` property.\n```swifty\nfab.friendlyTap = true\nscrollView.addSubview(fab)\n```\nWith the default location of the frame, the button is now tappable until the right and rightbottom of the screen. This prevents tapping behind it by accident.\n\n### Animation type\n\u003ctable\u003e\n\u003ctr\u003e\n\u003cth\u003ePop\u003c/th\u003e\u003cth\u003eFade\u003c/th\u003e\u003cth\u003eSlide Left\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cimg src=\"https://github.com/kciter/Floaty/raw/master/Images/preview.gif\" width='187' alt=\"Pop animation gif\"\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cimg src=\"https://github.com/kciter/Floaty/raw/master/Images/fade_ani.gif\" width='187' alt=\"Fade animation gif\"\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cimg src=\"https://github.com/kciter/Floaty/raw/master/Images/slideleft_ani.gif\" width='187' alt=\"Slide left animation gif\"\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth\u003eSlide Up\u003c/th\u003e\u003cth\u003eNone\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cimg src=\"https://github.com/kciter/Floaty/raw/master/Images/slideup_ani.gif\" width='187' alt=\"Slide up animation gif\"\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cimg src=\"https://github.com/kciter/Floaty/raw/master/Images/none_ani.gif\" width='187' alt=\"None animation gif\"\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## ToDo\n* [ ] Labels to come at the right hand side of the FAB Item menu.\n\n## Donate\nIf you like this open source, you can sponsor it. :smile:\n\n[Paypal me](https://paypal.me/kciter)\n\n## License\nThe MIT License (MIT)\n\nCopyright (c) 2015 Lee Sun-Hyoup\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","funding_links":["https://github.com/sponsors/kciter","https://paypal.me/kciter"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkciter%2Ffloaty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkciter%2Ffloaty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkciter%2Ffloaty/lists"}