Cauli

public class Cauli

The Cauli class is the starting point of the Cauli framework. Use the perconfigured Cauli.shared or create your own instance. Please check the Readme.md for more information.

  • The shared Cauli instance. This instance is fully configured with the default Florets. Make sure to call the run() function to start the instance. You can create a new Cauli instance with your own Configuration and Florets.

    Declaration

    Swift

    public static let shared: Cauli
  • The Storage used by this instance to store all Records.

    Declaration

    Swift

    public let storage: Storage
  • Creates and returns a new Cauli instance.

    Declaration

    Swift

    public init(_ florets: [Floret], configuration: Configuration = .standard)

    Parameters

    florets

    The florets that should be used.

    configuration

    The configuration.

  • The ViewController for the Cauli UI. For the shared Cauli instance, and if enableShakeGesture in the Configuration is set to true this ViewController will be shown when shaking the device. You can use this function to create a new ViewController and display it manually. Attention: This ViewController expects to be displayed in a navigation stack, as it can try to push other ViewControllers to the navigation stack.

    Declaration

    Swift

    public func viewController() -> UIViewController

    Return Value

    A new, unretained ViewController.

  • Starts this Cauli instance.

    Declaration

    Swift

    public func run()
  • Stops this Cauli instance.

    Declaration

    Swift

    public func pause()