MIDITimeTableMeasureView
@MainActor
open class MIDITimeTableMeasureView : UIView
Draws time table measures in its frame. Use tintColor property to change text and bar colors.
-
Number of measure bars.
Declaration
Swift
@MainActor public var barCount: Int { get set } -
Number of beats in a measure.
Declaration
Swift
@MainActor public var beatCount: Int { get set } -
Number of grid subdivisions per beat, used for drawing the small snap ticks within a beat. Defaults 4.
Declaration
Swift
@MainActor public var snapResolution: Int { get set } -
Property to show bar numbers. Defaults true.
Declaration
Swift
@MainActor public var showsBarNumbers: Bool { get set } -
The x-range (in this view’s own coordinate space) of bars to realize layers for. Bars outside it are freed into a reuse pool instead of laid out, so the number of live
MIDITimeTableMeasureLayers tracks what’s on screen rather than the whole timeline. The owningMIDITimeTableViewkeeps this in sync with the visible viewport (plus a small overscan margin) on every layout pass, including scroll. Defaults to a large placeholder so a view used standalone, before anything sets a real value, still shows its bars.Declaration
Swift
@MainActor public var virtualizationRect: CGRect -
Forces every bar layer to be rebuilt from scratch on the next layout pass. You shouldn’t normally need this —
barCount/beatCount/snapResolution/showsBarNumbersalready trigger a refresh when they actually change — but it’s kept as a manual escape hatch.Declaration
Swift
@MainActor public func update() -
Undocumented
Declaration
Swift
@MainActor open override func layoutSubviews()