Classes

The following classes are available globally.

  • The abstract superclass for animations in Argo Animation. You do not create instance of CAAnimation: to animate UIKit view or ArgoKit objects, create instances of the concrete subclasses Animation, SpringAnimation, or AnimationGroup.

    See more

    Declaration

    Swift

    public class AnimationBasic : NSObject
  • The basic class for single-keyframe animations.

            Animation(type: .color)
                .duration(duration)
                .from(UIColor)
                .to(UIColor)
    
            Animation(type: .textColor)
                .duration(duration)
                .from(UIColor)
                .to(UIColor)
    
            Animation(type: .position)
                .duration(duration)
                .from(x, y)
                .to(x, y)
                .resetOnStop(true)
    
            Animation(type: .rotation)
                .duration(duration)
                .from(fromValue)
                .to(toValue)
    
            Animation(type: .scale)
                .duration(duration)
                .from(xScale, yScale)
                .to(xScale, yScale)
    
            Animation(type: .contentOffset)
                .duration(duration)
                .from(x, y)
                .to(x, y)
    
    See more

    Declaration

    Swift

    public class Animation : AnimationBasic
  • An object that allows multiple animations to be grouped and run concurrently.

            AnimationGroup()
                .delay(delay)
                .animations([Animation])
    
    See more

    Declaration

    Swift

    public class AnimationGroup : AnimationBasic
  • An animation that applies a spring-like force to a layer’s properties.

            SpringAnimation(type: .position)
                .duration(duration)
                .from(x, y)
                .to(x, y)
                .resetOnStop(true)
                .springVelocity(Velocity)
                .springBounciness(Bounciness)
                .springSpeed(Speed)
                .springTension(Tension)
    
    See more

    Declaration

    Swift

    public class SpringAnimation : Animation
  • Wrapper of UIAlertController An object that displays an alert message to the user.

             AlertView(title: "Title", message: "Message", preferredStyle: UIAlertController.Style.alert)
             .destructive(title: "Delete") { text in
                 // delete action
             }
             .cancel(title: "Cancel") {
                 // cancel action
             }
             .show()
    
    See more

    Declaration

    Swift

    public class AlertView : View
  • Wrapper datasource of List or Grid dataSource = [Element] or dataSource = [[Element]]

    Example:

         struct ListView: View {
    
             @DataSource var dataSource: [Model] = [Model]()
             @DataSource var headerDataSource: [Model] = [Model]()
             @DataSource var footerDataSource: [Model] = [Model]()
    
             var body: View {
    
                 List(data:$dataSource){ data in
                     Row(data)
                 }
                 .sectionHeader($headerDataSource) { data in
                     Header(data)
                 }
                 .sectionFooter($footerDataSource) { data in
                     Footer(data)
                 }
                 .didSelectRow { (data, index) in
                     // Did Select row action
                 }
             }
    
             func appendData(data: Model) {
                 $dataSource.append(data)
                 $dataSource.apply()
             }
         }
    
    See more

    Declaration

    Swift

    @propertyWrapper
    public class DataSource<Value>
  • Wrapper of UICollectionView An object that manages an ordered collection of data items and presents them using customizable layouts.

    Example:

         struct GridView: View {
    
             @DataSource var dataSource: [Model] = [Model]()
             @DataSource var headerDataSource: [Model] = [Model]()
             @DataSource var footerDataSource: [Model] = [Model]()
    
             var body: View {
    
                 Grid(data:$dataSource){ data in
                     Item(data)
                 }
                 .sectionHeader($headerDataSource) { data in
                     Header(data)
                 }
                 .sectionFooter($footerDataSource) { data in
                     Footer(data)
                 }
                 .cellSelected { (data, index) in
                     // Did Select item action
                 }
             }
    
             func appendData(data: Model) {
                 models.append(data)
                 $dataSource.apply()
             }
         }
    
    See more

    Declaration

    Swift

    public class Grid<D> : ScrollView
  • Wrapper of UITableView A view that presents data using rows arranged in a single column.

    Example:

         struct ListView: View {
    
             @DataSource var dataSource: [Model] = [Model]()
             @DataSource var headerDataSource: [Model] = [Model]()
             @DataSource var footerDataSource: [Model] = [Model]()
    
             var body: View {
    
                 List(data:$dataSource){ data in
                     Row(data)
                 }
                 .sectionHeader($headerDataSource) { data in
                     Header(data)
                 }
                 .sectionFooter($footerDataSource) { data in
                     Footer(data)
                 }
                 .didSelectRow { (data, index) in
                     // Did Select row action
                 }
             }
    
             func appendData(data: Model) {
                 $dataSource.append(data)
                 $dataSource.apply()
             }
         }
    
    See more

    Declaration

    Swift

    public class List<D> : ScrollView
  • A single action to present when the user swipes horizontally in a list row.

    See more

    Declaration

    Swift

    @available(iOS, introduced: 8.0, deprecated: 13.0, message: "Use ListContextualAction and related APIs instead.")
    public class ListRowAction : UITableViewRowAction
  • An action to display when the user swipes a list row.

    See more

    Declaration

    Swift

    @available(iOS 11.0, *)
    public class ListContextualAction : UIContextualAction
  • The set of actions to perform when swiping on rows of a list.

    See more

    Declaration

    Swift

    @available(iOS 11.0, *)
    public class ListSwipeActionsConfiguration : UISwipeActionsConfiguration
  • Undocumented

    See more

    Declaration

    Swift

    public class ProgressViewStyleConfiguration
  • Wrapper of UIScrollView

    See more

    Declaration

    Swift

    public class ScrollView : View
  • Undocumented

    See more

    Declaration

    Swift

    public class TabSegment : View
  • A scrollable, multiline text region. Wrapper of UITextView

    UITextView supports the display of text using custom style information and also supports text editing. You typically use a text view to display multiple lines of text, such as when displaying the body of a large text document. This class supports multiple text styles through use of the attributedText property. (Styled text is not supported in versions of iOS earlier than iOS 6.) Setting a value for this property causes the text view to use the style information provided in the attributed string. You can still use the font, textColor, and textAlignment properties to set style attributes, but those properties apply to all of the text in the text view. It’s recommended that you use a text view—and not a UIWebView object—to display both plain and rich text in your app.

    TextView(text: "Hello, World!")
         .height(100)
         .font(size: 20)
         .font(style: .bold)
         .margin(edge: .top, value: 96)
         .backgroundColor(.yellow)
         .cornerRadius(10)
         .didEndEditing { text in
             print("\(String(describing: text))")
         }
         .shouldEndEditing { text -> Bool in
             print("\(String(describing: text))")
             return true
         }
         .didChangeText { text in
             print("\(String(describing: text))")
         }.gesture(gesture: getstur)
         .onTapGesture {
             print("on tap")
         }.onLongPressGesture(numberOfTaps: 1, numberOfTouches: 3) {
             print("on long press")
         }
    
    See more

    Declaration

    Swift

    public class TextView : ScrollView

Init

  • Undocumented

    See more

    Declaration

    Swift

    public class ViewPage<T> : ScrollView
  • Undocumented

    See more

    Declaration

    Swift

    @propertyWrapper
    public class GestureProperty<Value>
  • A UIKit view that hosts a ArgoKit view hierarchy.

    Example:

             let hostView: UIHostingView = UIHostingView(content: Content(), frame:self.view.bounds)
             self.view.addSubview(hostView)
    
    See more

    Declaration

    Swift

    public class UIHostingView : UIView
  • A UIKit view controller that manages a ArgoKit view hierarchy.

    Example:

         class AppDelegate: UIResponder, UIApplicationDelegate {
    
             var window: UIWindow?
    
             func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
                 // Override point for customization after application launch.
    
                 let rootVC = UIHostingController(rootView: RootView())
                 let window = UIWindow.init(frame: UIScreen.main.bounds)
                 window.rootViewController = rootVC
                 self.window = window
                 window.makeKeyAndVisible()
    
                 return true
             }
         }
    
    See more

    Declaration

    Swift

    open class UIHostingController : UIViewController