getting legit button feel to the record button

This commit is contained in:
talksik
2021-12-12 14:04:04 -08:00
parent 03cec7bb40
commit 48a7206408
@@ -15,40 +15,18 @@ struct FooterControlsView: View {
HStack(alignment: .center) { HStack(alignment: .center) {
Spacer() Spacer()
Button(action: {
print("pressed button")
}) {
Image(systemName: viewModel.isRecording ? "waveform" : "mic.fill") Image(systemName: viewModel.isRecording ? "waveform" : "mic.fill")
.foregroundColor(.white) .foregroundColor(.white)
.padding() .padding()
.background(NirvanaColor.teal) .background(NirvanaColor.teal)
.clipShape(Circle()) .clipShape(Circle())
.shadow(radius: 10) .shadow(radius: 10)
// .scaleEffect(self.scaleValue) }
.onLongPressGesture {
} }
.animation(.linear(duration:2), value: viewModel.isRecording)
.onTapGesture {
viewModel.onStartRecording()
print("tap gesture active")
}
// .onTapGesture(
// touchBegan: {
// withAnimation {
// self.scaleValue = 1.2
// }
//
// viewModel.onStartRecording()
//
// print("long press active")
// }, touchEnd: {_ in
// withAnimation {
// self.scaleValue = 1.0
// }
//
// print("long press not active anymore")
// }
}
.frame(maxWidth: .infinity)
.padding() .padding()
} }
} }