AKPlaygroundLoop

public class AKPlaygroundLoop: NSObject

Class to handle updating via CADisplayLink

  • Repeat this loop at a given period with a code block

    Declaration

    Swift

    public init(every dur: Double, handler: @escaping ()->())

    Parameters

    every

    Period, or interval between block executions

    handler

    Code block to execute

  • Repeat this loop at a given frequency with a code block

    Declaration

    Swift

    public init(frequency: Double, handler: @escaping ()->())

    Parameters

    frequency

    Frequency of block executions in Hz

    handler

    Code block to execute