Skip to content

Commit

Permalink
Public initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
aure committed Sep 11, 2022
1 parent 4c05ea1 commit 5fea4e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/AudioKitUI/Controls/ADSRWidget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ public struct ADSRWidget: UIViewRepresentable {
public typealias UIViewType = ADSRView
var callback: (AUValue, AUValue, AUValue, AUValue) -> Void

public init(callback: @escaping (AUValue, AUValue, AUValue, AUValue) -> Void) {
self.callback = callback
}

public func makeUIView(context _: Context) -> ADSRView {
let view = ADSRView(callback: callback)
view.bgColor = .systemBackground
Expand Down

0 comments on commit 5fea4e2

Please sign in to comment.