Structures

The following structures are available globally.

  • A custom parameter attribute that constructs animations from closures.

    See more

    Declaration

    Swift

    @resultBuilder
    public struct ArgoKitAnimationBuilder
  • A custom parameter attribute that constructs animations from closures.

    See more

    Declaration

    Swift

    @resultBuilder
    public struct ArgoKitAnimationsBuilder
  • Undocumented

    See more

    Declaration

    Swift

    public struct ArgoKitNodeAlias
  • Wrapper of UIVisualEffectView An object that implements some complex visual effects.

             BlurEffectView(style:.dark) {
                 // content
             }
    
    See more

    Declaration

    Swift

    public struct BlurEffectView : View
  • Wrapper of UIButton A control that executes your custom code in response to user interactions.

             Button {
                 // click action
             } builder: {
                 // content
             }
    
    See more

    Declaration

    Swift

    public struct Button : View
  • Wrapper of UIView An object that manages the content for a rectangular area on the screen.

    See more

    Declaration

    Swift

    public struct EmptyView : View
  • A structure that computes views on demand from an underlying collection of of data.

         ForEach(model.titles) { item in
             Text(item).margin(edge: .top, value: 23)
         }
    
    See more

    Declaration

    Swift

    public struct ForEach<T> : View
  • A view that arranges its children in a horizontal line. same as the flex-direction: row in flexbox layout.

         HStack {
             Text("1")
             Text("2")
             Text("3")
         }
    
    See more

    Declaration

    Swift

    public struct HStack : View
  • Wrapper of UIImageView A view that displays a single image or a sequence of animated images in your interface.

             Image("name")
             Image("./doc/name.jpg")
             Image("https://www.example.com")
    
    See more

    Declaration

    Swift

    public struct Image : View
  • Wrapper of UIDatePicker. A control for the inputting of date and time values.

    You can use a date picker to allow a user to enter either a point in time (calendar date, time value, or both) or a time interval (for example, for a timer). The date picker reports interactions to its associated target object. To add a date picker to your interface: Set the date picker mode at creation time. Supply additional configuration options such as minimum and maximum dates if required. Connect an action method to the date picker. Set up Auto Layout rules to govern the position of the date picker in your interface. You use a date picker only for handling the selection of times and dates. If you want to handle the selection of arbitrary items from a list, use a UIPickerView object.

     DatePicker{ date in
         print("\(date)")
     }
     .width(300)
     .height(100)
    
    See more

    Declaration

    Swift

    public struct DatePicker : View
  • Wrapper of UIPickerView.

    A view that uses a spinning-wheel or slot-machine metaphor to show one or more sets of values.

             PickerView($pickerData) { item in
                 Text(item).grow(1).textAlign(.center)
             }
             .width(100%)
             .height(50)
             .widthForComponent({ (component) -> Float in
                 return 50
             })
             .rowHeightForComponent({ (component) -> Float in
                 return 44
             })
             .didSelectRow({ (text, row, component) in
                 // Did select action
             })
    
    See more

    Declaration

    Swift

    public struct PickerView<T> : View
  • Wrapper of UIProgressView A view that depicts the progress of a task over time.

    The UIProgressView class provides properties for managing the style of the progress bar and for getting and setting values that are pinned to the progress of a task. For an indeterminate progress indicator—or, informally, a “spinner”—use an instance of the UIActivityIndicatorView class.

     ProgressView(0.5)
         .width(100)
         .height(10)
         .backgroundColor(.brown)
    
    See more

    Declaration

    Swift

    public struct ProgressView : View
  • Undocumented

    See more

    Declaration

    Swift

    public struct SegmenteControl : View
  • Undocumented

    See more

    Declaration

    Swift

    public struct Slider : View
  • Representing of space within a container along the main axis. same as the view of which felxGrow is 1.0.

        HStack {
            Text("1")
            Text("2")
            Spacer()
            Text("3")
        }
    
    See more

    Declaration

    Swift

    public struct Spacer : View
  • Undocumented

    See more

    Declaration

    Swift

    public struct Stepper : View
  • The View Representing of text,is implemented based on UILabel.

                 Text("content..")
                     .font(size: 25)
                     .textColor(.white)
                     .lineLimit(0)
                     .lineSpacing(10)
                     .backgroundColor(.orange)
    
    See more

    Declaration

    Swift

    public struct Text : TextProtocol
  • Undocumented

    See more

    Declaration

    Swift

    public struct Toggle : View
  • The container that align children from top to bottom. same as the flex-direction: column in flexbox layout.

         VStack {
             Text("1")
             Text("2")
             Text("3")
         }
    
    See more

    Declaration

    Swift

    public struct VStack : View
  • Wrapper of UITapGestureRecognizer A discrete gesture recognizer that interprets single or multiple taps.

            TapGesture(numberOfTaps: 1, numberOfTouches: 1) { tap in
                // tap action
            }
    
    See more

    Declaration

    Swift

    public struct TapGesture : Gesture
  • Wrapper of UILongPressGestureRecognizer A discrete gesture recognizer that interprets long-press gestures.

           LongPressGesture(numberOfTaps: 1, numberOfTouches: 1, minimumPressDuration: 0.5, allowableMovement: 10) { longPress in
               // long press action
           }
    
    See more

    Declaration

    Swift

    public struct LongPressGesture : Gesture
  • Wrapper of UIPanGestureRecognizer A discrete gesture recognizer that interprets panning gestures.

           PanGesture(minimumNumberOfTouches: 1, maximumNumberOfTouches: 10) { pan in
               // pan action
           }
           .onBegan { (pan, location, velocity, direction) in
               // on began action
           }
           .onMoved { (pan, location, velocity) in
               // on moved acton
           }
           .onEnded { (pan, location, velocity) in
               // on ended action
           }
           .onCancelled { (pan, location, velocity) in
               // on cancelled action
           }
           .enableDragView(true)
    
    See more

    Declaration

    Swift

    public struct PanGesture : Gesture
  • Wrapper of UIPinchGestureRecognizer A discrete gesture recognizer that interprets pinching gestures involving two touches.

           PinchGesture(scale: 3) { pinch in
               // pinch action
           }
    
    See more

    Declaration

    Swift

    public struct PinchGesture : Gesture
  • Wrapper of UIRotationGestureRecognizer A discrete gesture recognizer that interprets rotation gestures involving two touches.

    See more

    Declaration

    Swift

    public struct RotationGesture : Gesture
  • Wrapper of UISwipeGestureRecognizer A discrete gesture recognizer that interprets swiping gestures in one or more directions.

           SwipeGesture(numberOfTouchesRequired: 1, direction:.right) { swipe in
               // swipe action
           }
    
    See more

    Declaration

    Swift

    public struct SwipeGesture : Gesture
  • Wrapper of UIScreenEdgePanGestureRecognizer A discrete gesture recognizer that interprets panning gestures that start near an edge of the screen.

           ScreenEdgePanGesture(edges: .right) { pan in
               // screen edge pan action
           }
    
    See more

    Declaration

    Swift

    public struct ScreenEdgePanGesture : Gesture
  • A ArgoKit view that manages a ArgoKit view hierarchy.

    See more

    Declaration

    Swift

    public struct HostView : View