- August 12, 2025
- Mins Read
Floaty is simple floating action button for iOS. (formerly KCFloatingActionButton)
Why change the name?
KCFloatingActionButton
is too long.
use_frameworks!
pod ‘Floaty’, ‘~> 4.2.0’
github “kciter/Floaty”
Once 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
.
dependencies: [
.package(url: “https://github.com/kciter/Floaty.git”, from: “4.2.1”)
]
To install manually the Floaty in an app, just drag the Floaty/*.swift
file into your project.
Floaty.global.button.addItem(title: “Hello, World!”)
Floaty.global.show()
let floaty = Floaty()
floaty.addItem(title: “Hello, World!”)
self.view.addSubview(floaty)
let floaty = Floaty()
floaty.addItem(“Hello, World!”, icon: UIImage(named: “icon”)!)
self.view.addSubview(floaty)
let floaty = Floaty()
floaty.addItem(“I got a handler”, icon: UIImage(named: “icon”)!, handler: { item in
let alert = UIAlertController(title: “Hey”, message: “I’m hungry…”, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: “Me too”, style: .default, handler: nil))
self.present(alert, animated: true, completion: nil)
floaty.close()
})
self.view.addSubview(floaty)
let item = FloatyItem()
item.buttonColor = UIColor.blueColor()
item.title = “Custom item”
Floaty.global.button.addItem(item: item)
You can use the rtlMode
property to mirror the Floaty Button for rtl languages.
Floaty.global.rtlMode = true
You can use the sticky
property.
floaty.sticky = true // sticking to parent UIScrollView(also UITableView, UICollectionView)
scrollView.addSubview(floaty)
You can use the friendlyTap
property.
fab.friendlyTap = true
scrollView.addSubview(fab)
With 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.
Pop | Fade | Slide Left |
---|---|---|
![]() |
![]() |
![]() |
Slide Up | None | |
![]() |
![]() |
Recognize your user's voice elegantly without having to figure out authorization and audio engines. SwiftSpeech Examples Features Installation Getting Started ...
Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements iOS 14.0 Installation ...
SlidingRuler is a Swift package containing a SwiftUI control that acts like an linear infinite slider or a finite, more precise ...
SkeletonUI aims to bring an elegant, declarative syntax to skeleton loading animations. Get rid of loading screens or spinners and ...