AdmiralUIKit Controls Buttons PlatformButton - admiral-team/admiralui-ios GitHub Wiki
Overview
Main button. Used for the most important actions. It is advisable to use one such button on the screen.
Code
let button = PlatformButton()
button.setTitle(name, for: .normal)
button.setImage(image, for: .normal)
button.setImage(image, for: .highlighted)
button.semanticContentAttribute = .forceLeftToRight
button.imageEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: LayoutGrid.doubleModule)
You can create a button with an activity indicator instead of text. In this case, the text that you pass to the Button will not be shown, but the activity indicator will be shown instead:
You can add accessibilityIdentifier (a string that identifies the element) in PlatformButton
Live Example
To run live demo with MapButtonStyle
open Xcode and run project with Example target. Then in the main page open Page Controls/PlatformButton:
Contribution
You can help us to find bugs or ask us to add features.
- To start
issue
please use ready-made templates. - To make changes to the repository, you need to create a
fork
of the project, make changes to the code and create apull request
in our project. You can read more about this in the Github documentation.