ImageTextButton
public struct ImageTextButton : View
A button that displays an image and/or text, and performs an action when tapped.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Initializes the button with both text and an image.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public init(_ text: String, imageName: ImageName, _ action: @escaping () -> ())Parameters
textThe text to display in the button.
imageNameThe name of the image to display in the button.
actionThe action to perform when the button is tapped.
-
Initializes the button with optional text.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public init(_ text: String?, _ action: @escaping () -> ())Parameters
textThe optional text to display in the button.
actionThe action to perform when the button is tapped.
-
Initializes the button with an image.
Declaration
Swift
public init(_ imageName: ImageName, _ action: @escaping () -> ())Parameters
imageNameThe name of the image to display in the button.
actionThe action to perform when the button is tapped.
-
The content and behavior of the view.
Declaration
Swift
public var body: some View { get }
TomTom SDK for iOS (0.66.0)
ImageTextButton