1.you can use the ZLRecordButton on view or controller
lazy var recordView: ZLRecordButton = {
let recordView = ZLRecordButton(frame: CGRect(x: 0, y: 530, width: UIScreen.main.bounds.size.width, height: 50))
recordView.delegate = self
return recordView
}()
- Ensure your view controller conforms to the
ZLRecordButtonProtocol
protocol:
class YourViewController: ZLRecordButtonProtocol{
func recordFinishRecordVoice(didFinishRecode voiceData: NSData) {
// YourViewController code here
}
}