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.
See FloatableUserInterfaces file in the package
link |
Stars: 0 |
Last commit: 3 years ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics