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 moreDeclaration
Swift
public class AnimationBasic : NSObject
-
The basic class for single-keyframe animations.
See moreAnimation(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)
Declaration
Swift
public class Animation : AnimationBasic
-
An object that allows multiple animations to be grouped and run concurrently.
See moreAnimationGroup() .delay(delay) .animations([Animation])
Declaration
Swift
public class AnimationGroup : AnimationBasic
-
An animation that applies a spring-like force to a layer’s properties.
See moreSpringAnimation(type: .position) .duration(duration) .from(x, y) .to(x, y) .resetOnStop(true) .springVelocity(Velocity) .springBounciness(Bounciness) .springSpeed(Speed) .springTension(Tension)
Declaration
Swift
public class SpringAnimation : Animation
-
Wrapper of UIAlertController An object that displays an alert message to the user.
See moreAlertView(title: "Title", message: "Message", preferredStyle: UIAlertController.Style.alert) .destructive(title: "Delete") { text in // delete action } .cancel(title: "Cancel") { // cancel action } .show()
Declaration
Swift
public class AlertView : View
-
Wrapper datasource of List or Grid dataSource = [Element] or dataSource = [[Element]]
Example:
See morestruct 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() } }
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:
See morestruct 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() } }
Declaration
Swift
public class Grid<D> : ScrollView
-
Wrapper of UITableView A view that presents data using rows arranged in a single column.
Example:
See morestruct 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() } }
Declaration
Swift
public class List<D> : ScrollView
-
A single action to present when the user swipes horizontally in a list row.
See moreDeclaration
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 moreDeclaration
Swift
@available(iOS 11.0, *) public class ListContextualAction : UIContextualAction
-
The set of actions to perform when swiping on rows of a list.
See moreDeclaration
Swift
@available(iOS 11.0, *) public class ListSwipeActionsConfiguration : UISwipeActionsConfiguration
-
Undocumented
See moreDeclaration
Swift
public class ProgressViewStyleConfiguration
-
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.
See moreTextView(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") }
Declaration
Swift
public class TextView : ScrollView
-
Undocumented
See moreDeclaration
Swift
public class ViewPage<T> : ScrollView
-
Undocumented
See moreDeclaration
Swift
@propertyWrapper public class GestureProperty<Value>
-
A UIKit view that hosts a ArgoKit view hierarchy.
Example:
See morelet hostView: UIHostingView = UIHostingView(content: Content(), frame:self.view.bounds) self.view.addSubview(hostView)
Declaration
Swift
public class UIHostingView : UIView
-
A UIKit view controller that manages a ArgoKit view hierarchy.
Example:
See moreclass 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 } }
Declaration
Swift
open class UIHostingController : UIViewController