Swiftpack.co -  hsoysal/Floatable as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
hsoysal/Floatable
Floatable is a 100% Swift framework to make UI elements having floating feature.
.package(url: "https://github.com/hsoysal/Floatable.git", from: "1.0.0")

Floatable

Floatable is a 100% Swift framework to make UI elements having floating feature.

It is a protocol in order to make UI floatable. You can customize your UI elements conforming to this protocol.

func editingRect(ofBounds bounds: CGRect) -> CGRect

It is for TextFields. It indicates the rect in which the user can edit the text with keyboard

func textRect(ofBounds bounds: CGRect) -> CGRect

It is for some UI elements like TextField, Label, Button. It indicates the rect in which the text of the element is being drawn.

func textChanged(ofBounds bounds: CGRect)

It is for some UI elements like TextField, Label, Button. The text of the element is being changed. It is the title for Buttons, or its the text for Labels and TextFields

func textChanged(ofBounds bounds: CGRect)

It is for some UI elements like TextField, Label, Button. The text of the element is being changed. It is the title for Buttons, or its the text for Labels and TextFields

var inset: CGFloat { get set }

It is the left and right padding. The floating label starts at the point that is away from the value of inset.

var floating: Bool { get set }

It is for whether the floating feature is turned on/off.

var floatingColor: UIColor? { get set }

It is the color of floating label.

var placeholder: String? { get }

It is the text of floating label.

var text: String? { get }

It is the text of UI elements like TextField, Button, Label, UIView. If it is empty, there will be no floating label.

var view: UIView { get }

It is the UI element that the floating label will be added its subview.

var floatingFont: UIFont? { get }

It is the font of the floating label. The custom font can be assignable to it. And also the font pointsize can be set.

Examples of Floatable UIs

See FloatableUserInterfaces file in the package

Floatables

GitHub

link
Stars: 0
Last commit: 3 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Related Packages

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API