Classes

The following classes are available globally.

  • Defines an object that handles the creation of animations for specific actions and keys.

    See more

    Declaration

    Swift

    public class Animation
  • Arc

    Arc is a concrete subclass of Shape that has a special initialzer that creates an arc whose shape is defined by rotating around a specified point.

    See more

    Declaration

    Swift

    public class Arc: Shape
  • AudioPlayer provides playback of audio data from a file or memory.

    Using an audio player you can:

    Play sounds of any duration

    Play sounds from files or memory buffers

    Loop sounds

    Play multiple sounds simultaneously, one sound per audio player, with precise synchronization

    Control relative playback level, stereo positioning, and playback rate for each sound you are playing

    Seek to a particular point in a sound file, which supports such application features as fast forward and rewind

    Obtain data you can use for playback-level metering

    See more

    Declaration

    Swift

    public class AudioPlayer: NSObject, AVAudioPlayerDelegate
  • The CanvasController class provides the infrastructure for managing the views of your iOS apps. A canvas controller manages a set of views that make up a portion of your app’s user interface. It is responsible for loading and disposing of those views, for managing interactions with those views, and for coordinating responses with any appropriate data objects. Canvas controllers also coordinate their efforts with other controller objects—including other view controllers—and help manage your app’s overall interface.

    See more

    Declaration

    Swift

    public class CanvasController: UIViewController
  • Circle is a concrete subclass of Ellipse that has a special initialzer that creates a uniform ellipse.

    See more

    Declaration

    Swift

    public class Circle: Ellipse
  • This document describes the Color object which represents color and sometimes opacity (alpha value). You can use Color objects to store color data, and pass them between various C4 objects such as Shape, Image, etc.

    Color internally wraps a CGColorSpaceRef called colorSpace, as well as a CGColorRef. From these two objects Color is able to properly maintain color data and convert it to / from other color objects such as UIColor, CIColor, Color, etc.

    See more

    Declaration

    Swift

    public class Color
  • Curve is a concrete subclass of Shape that has a special initialzer that creates an bezier whose shape is defined by its end points and two control points.

    See more

    Declaration

    Swift

    public class Curve: Shape
  • Ellipse is a concrete subclass of Shape that has a special initialzer that creates an ellipse whose shape is defined by the object’s frame.

    See more

    Declaration

    Swift

    public class Ellipse: Shape
  • Font objects represent fonts to an application, providing access to characteristics of the font and assistance in laying out glyphs relative to one another.

    See more

    Declaration

    Swift

    public class Font: NSObject
  • The Gradient class draws a color gradient over its background color, filling the shape of the view (including rounded corners).

    See more

    Declaration

    Swift

    public class Gradient: View
  • The GradientLayer class draws a color gradient over its background color, filling the shape of the layer (including rounded corners)

    See more

    Declaration

    Swift

    public class GradientLayer: CAGradientLayer
  • A Image provides a view-based container for displaying a single image. You can create images from files, from other image objects, or from raw image data you receive.

    See more

    Declaration

    Swift

    public class Image: View, NSCopying
  • Subclass of CALayer that handles animating its contents.

    See more

    Declaration

    Swift

    public class ImageLayer: CALayer
  • A subclass of CALayer that has a rotation property.

    See more

    Declaration

    Swift

    public class Layer: CALayer
  • Line is a is a concrete subclass of Polygon that contains only two points.

    This subclass overrides the points variable so that it can only ever have 2 points, and also has an endPoints variable that allows the user to edit either end of the line (animatable).

    See more

    Declaration

    Swift

    public class Line: Polygon
  • This document describes the Movie class. You use a Movie object to implement the playback of video files, it encapulates an AVQueuePlayer object which handles the loading and control of assets.

    The Movie class is meant to simplify the addition of videos to your application. It is also a subclass of View, and so has all the common animation, interaction and notification capabilities.

    A C4Movie’s resizing behaviour is to map itself to the edges of its visible frame. This functionality implicitly uses AVLayerVideoGravityResize as its layer’s default gravity. You can change the frame of the movie from an arbitrary shape back to its original proportion by using its originalSize, originalRatio, or by independently setting either its width or height properties.

    See more

    Declaration

    Swift

    public class Movie: View
  • A Path is a sequence of geometric segments which can be straight lines or curves.

    See more

    Declaration

    Swift

    public class Path: Equatable
  • Extension for CAShapeLayer that allows overriding the actions for specific properties.

    See more

    Declaration

    Swift

    public class PlayerLayer: AVPlayerLayer
  • Polygon is a concrete subclass of Shape that has a special initialzer that creates a non-uniform shape made up of 3 or more points.

    See more

    Declaration

    Swift

    public class Polygon: Shape
  • QuadCurve is a concrete subclass of Curve that modifies it shape based on a single point rather than 2 used by its parent class.

    See more

    Declaration

    Swift

    public class QuadCurve: Curve
  • Rectangle is a concrete subclass of Shape that has a special initialzer that creates a rectangle whose shape is determined by its frame.

    See more

    Declaration

    Swift

    public class Rectangle: Shape
  • RegularPolygon is a is a concrete subclass of Polygon that defines a shape whose sides are uniform (e.g. pentagon, octagon, etc.).

    This class defines two variables called sides and phase that represent the number of sides and the initial rotation of the shape (respectively). The default shape is a hexagon.

    See more

    Declaration

    Swift

    public class RegularPolygon: Polygon
  • Shape is a concrete subclass of View that draws a bezier path in its coordinate space.

    See more

    Declaration

    Swift

    public class Shape: View
  • Extension for CAShapeLayer that allows overriding the actions for specific properties.

    See more

    Declaration

    Swift

    public class ShapeLayer: CAShapeLayer
  • Star is a concrete subclass of Polygon that defines a star shape.

    See more

    Declaration

    Swift

    public class Star: Polygon
  • StoredAnimation is a concrete subclass of Animation.

    A StoredAnimation object is able to apply a set of stored animation properties to an object.

    This class is useful for serializing and deserializing animations.

    See more

    Declaration

    Swift

    public class StoredAnimation: Animation
  • TextShape defines a concrete subclass of Shape that draws a bezier curve whose shape looks like text.

    See more

    Declaration

    Swift

    public class TextShape: Shape
  • You use the Timer class to create timer objects or, more simply, timers. A timer waits until a certain time interval has elapsed and then fires, executing a specified block of code.

    See more

    Declaration

    Swift

    public final class Timer: NSObject
  • Triangle defines a concrete subclass of Polygon whose shape is a closed triangle.

    See more

    Declaration

    Swift

    public class Triangle: Polygon
  • The View class defines a rectangular area on the screen and the interfaces for managing visual content in that area. The View class itself provides basic behavior for filling its rectangular area with a background color. More sophisticated content can be presented by subclassing UIView and implementing the necessary drawing and event-handling code yourself. The C4 framework also includes a set of standard subclasses that range from simple shapes to movies and images that can be used as-is.

    See more

    Declaration

    Swift

    public class View: NSObject
  • ViewAnimation is a concrete subclass of Animation whose execution blocks affect properties of view-based objects.

    See more

    Declaration

    Swift

    public class ViewAnimation: Animation
  • A sequence of animations that run one after the other. This class ignores the duration property.

    See more

    Declaration

    Swift

    public class ViewAnimationSequence: Animation
  • Groups animations so that they can all be run at the same time. The completion call is dispatched when all the animations in the group have finished. This class ignores the duration property.

    See more

    Declaration

    Swift

    public class ViewAnimationGroup: Animation
  • Wedge is a concrete subclass of Shape whose shape is a wedge with a rounded outer edge.

    See more

    Declaration

    Swift

    public class Wedge: Shape