RadarView

final public class RadarView: RippleView

A radar view with ripple animation

  • the maximum number of items that can be shown in the radar view, if you use more, some layers will overlaying other layers

    Declaration

    Swift

    public var radarCapacity: Int
  • The padding between items, the default value is 10

    Declaration

    Swift

    @IBInspectable public var paddingBetweenItems: CGFloat = 10
  • The bounds rectangle, which describes the view’s location and size in its own coordinate system.

    Declaration

    Swift

    public override var bounds: CGRect
  • The frame rectangle, which describes the view’s location and size in its superview’s coordinate system.

    Declaration

    Swift

    public override var frame: CGRect
  • The delegate of the radar view

    Declaration

    Swift

    public weak var delegate: RadarViewDelegate?
  • The data source of the radar view

    Declaration

    Swift

    public weak var dataSource: RadarViewDataSource?
  • Lays out subviews.

    Declaration

    Swift

    override public func layoutSubviews()
  • Tells this object that one or more new touches occurred in a view or window.

    Declaration

    Swift

    public override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?)

    Parameters

    touches

    A set of UITouch instances that represent the touches for the starting phase of the event

    event

    The event to which the touches belong.

  • Tells the delegate the animation has ended.

    Declaration

    Swift

    public func animationDidStop(_ anim: CAAnimation, finished flag: Bool)

    Parameters

    anim

    The CAAnimation object that has ended.

    flag

    A flag indicating whether the animation has completed by reaching the end of its duration.

  • Add a list of items to the radar view

    Declaration

    Swift

    public func add(items: [Item], using animation: CAAnimation = Animation.transform())

    Parameters

    items

    the items to add to the radar view

    animation

    the animation used to show items layers

  • Add item randomly in the radar view

    Declaration

    Swift

    public func add(item: Item, using animation: CAAnimation = Animation.transform())

    Parameters

    item

    the item to add to the radar view

    animation

    the animation used to show items layers

  • Remove item layer from the radar view

    Declaration

    Swift

    public func remove(item: Item)

    Parameters

    item

    the item to remove from Radar View