SwiftUI Components

VGS Show iOS SDK provide support for integration with apps that are buid with SwiftUI toolkit by providing SwiftUI wrappers for all VGS UI elements. VGS Show SwiftUI wrappers are designed to make integration easier and more straight forward by taking care of all needed state and editing events.

VGSLabelRepresentable

A user interface element that displays any revealed text to the user.

Declaration

struct VGSLabelRepresentable: UIViewRepresentable

Creating VGSLabelRepresentable

/// Initialization
///
/// - Parameters:
///   - vgsShow: `VGSShow` instance that will manage label states.
///   - contentPath: `String` path in reveal request response with revealed data that should be displayed in VGSLabelRepresentable .
public init(vgsShow: VGSShow, contentPath: String)

Instance Methods

VGSLabelRepresentable is a SwiftUI wrapper around VGSLabel and have similar attributes and functionality represented in SwiftUI way.

VGSLabelRepresentable Text modifiers

VGSLabelRepresentable View and Layout modifiers

VGSLabelRepresentable Accessibility modifiers

VGSLabelRepresentable Event modifiers

Code example

You can reade more about Data formatting, Secure text, Styling and other feature that work similar in VGSLabel at VGSLabel page.

VGSPDFViewRepresentable

A user interface element that displays revealed pdf document to the user.

Declaration

Creating VGSPDFViewRepresentable

Instance Methods

VGSPDFViewRepresentable is a SwiftUI wrapper around VGSPDFView and have similar attributes and functionality represented in SwiftUI way.

VGSPDFViewRepresentable UI modifiers

VGSPDFViewRepresentable Event modifiers

Code example

Reveal PDF with VGSShowSDK

Revealing PDF files might take more time than for text data. Consider your pdf file size and specify additional request timeout with VGSShowRequestOptions if needed. Max file size that can be sent to VGS is 24Mbarrow-up-right.

Revealing invalid base64 data or invalid pdf data will produce an error.>

You can reade more about other PDF View feature that work similar in VGSPDFView at VGSPDFView page.

VGSImageViewRepresentable

A user interface element that displays revealed pdf document to the user.

Declaration

Creating VGSImageViewRepresentable

Instance Methods

VGSImageViewRepresentable is a SwiftUI wrapper around VGSImageView and have similar attributes and functionality represented in SwiftUI way.

VGSImageViewRepresentable UI modifiers

VGSImageViewRepresentable Event modifiers

Code example

Reveal image with VGSShowSDK

Revealing image files might take more time than for text data. Consider your image file size and specify additional request timeout with VGSShowRequestOptions if needed. Max file size that can be sent to VGS is 24Mbarrow-up-right.

Revealing invalid base64 data or invalid image data will produce an error.

You can reade more about other Image View feature that work similar in VGSImageView at VGSImageView page.

Last updated