NavigationLink

public struct NavigationLink : View
extension NavigationLink: Renderable

This view will perform navigation when triggered by the user. The behavior of this view is same as a Button, but the action is predefined to navigate to a specified View.

  • Declaration

    Swift

    public var viewStore: ViewValues
  • Declaration

    Swift

    public var body: View { get }
  • Creates an instance that will navigate to the destination when triggered by user interaction.

    Declaration

    Swift

    public init(destination: View, @ViewBuilder label: () -> View)

    Parameters

    destination

    The view to which the current view hierarchy will navigate to.

    label

    The visual contents of self

  • Creates an instance that will navigate to the destination when the specified isActive binding becomes true.

    Declaration

    Swift

    public init(destination: View, isActive: Binding<Bool>, @ViewBuilder label: () -> View)

    Parameters

    destination

    The view to which the current view hierarchy will navigate to.

    isActive

    Will trigger the navigation when true. When false, will dismiss the navigation if active.

    label

    The visual contents of self

  • Setting this method to true will hide the tab bar every time the destination view is navigated to.

    Important

    Not SwiftUI compatible.

    Declaration

    Swift

    public func hidesTabBar(_ hidden: Bool) -> NavigationLink
  • Declaration

    Swift

    public func createView(context: Context) -> UIView
  • Declaration

    Swift

    public func updateView(_ view: UIView, context: Context)