Swiftpack.co - hsoysal/Floatable as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by hsoysal.
hsoysal/Floatable 1.0.0
Floatable is a 100% Swift framework to make UI elements having floating feature.
⭐️ 0
🕓 3 years ago
.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 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Related Packages

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