TomTomSDKCommonUI+View
extension View
-
Conditionally adds a shadow to the view.
Important
This is a Public Preview API. It may be changed or removed at any time.
Declaration
Swift
@ViewBuilder public func conditionalShadow(_ shouldShow: Bool) -> some ViewParameters
shouldShowA Boolean value that determines whether the shadow should be shown.
Return Value
A view that conditionally applies a shadow.
-
A view modifier that conditionally hides the view.
Important
This is a Public Preview API. It may be changed or removed at any time.
Declaration
Swift
@ViewBuilder public func hidden(_ shouldHide: Bool) -> some ViewParameters
shouldHideA Boolean value that determines whether the view should be hidden.
Return Value
A view that is conditionally hidden.
-
Adds an overlay to the view.
Important
This is a Public Preview API. It may be changed or removed at any time.
Declaration
Swift
@ViewBuilder public func overlay(show: Bool, height: CGFloat, overlayOpacity: Double) -> some ViewParameters
showA Boolean value that determines whether the overlay is shown.
heightThe height of the overlay.
overlayOpacityThe opacity of the overlay.
Return Value
A view that conditionally applies an overlay.
-
Reads the size of the view and triggers the
onChangeclosure with the new size.Important
This is a Public Preview API. It may be changed or removed at any time.
Declaration
Swift
public func readSize(onChange: @escaping (CGSize) -> ()) -> some ViewParameters
onChangeA closure that gets called with the new size of the view.
Return Value
A view that reads its size and triggers the
onChangeclosure.
-
Adds a corner radius to specific corners of the view.
Important
This is a Public Preview API. It may be changed or removed at any time.
Declaration
Swift
public func cornerRadius(_ radius: CGFloat, corners: UIRectCorner) -> some ViewParameters
radiusThe radius of the corner.
cornersThe corners to which the radius is applied.
Return Value
A view that has the specified corner radius applied to the specified corners.
-
Adds a modifier to round the top edges of the view.
Important
This is a Public Preview API. It may be changed or removed at any time.
Declaration
Swift
public func topEdgesRounded() -> some ViewReturn Value
A view with the top edges rounded.
-
Conditionally wraps the view inside a horizontal ScrollView.
Important
This is a Public Preview API. It may be changed or removed at any time.
Declaration
Swift
@ViewBuilder public func wrapInScroll(_ shouldWrap: Bool) -> some ViewParameters
shouldWrapA Boolean value that determines whether to wrap the view in a ScrollView.
Return Value
A view that is conditionally wrapped in a horizontal ScrollView.
-
Applies a custom style to a button with an image and text.
Important
This is a Public Preview API. It may be changed or removed at any time.
Declaration
Swift
public func imageTextButtonStyle(_ color: Color, fontColor: Color) -> some ViewParameters
colorThe background color of the button.
fontColorThe color of the text and image.
Return Value
A view with applied style.
TomTom SDK for iOS (0.66.0)
TomTomSDKCommonUI+View