Xcode – Button is not Taking Given Height and Width in SwiftUI
I am new to swiftui. I am making a login screen in which I have to use log in with apple and gmail buttons. I am using a custom view to design the button. Here is the code for that…
I am new to swiftui. I am making a login screen in which I have to use log in with apple and gmail buttons. I am using a custom view to design the button. Here is the code for that…
func setupButtonUI() { if let detailsImage = UIImage(named: "detalji_icon") { setImage(detailsImage, for: .normal) contentHorizontalAlignment = .left contentVerticalAlignment = .center } if let arrowImage = UIImage(named: "posalji_zahtev_black_icon") { setImage(arrowImage, for: .normal) contentHorizontalAlignment = .right contentVerticalAlignment = .center } }/this is one…
My code: Button(action: { AudioServicesPlaySystemSound(1026) isActive.toggle() }){ HStack{ Image(systemName: "trash") Text("delete") } } .foregroundColor(.red) .font(.body) .keyboardShortcut("b",modifiers: []) in this stage keyboardShortcut is working but when I add buttonStyle keyboardShortcut is not working code with buttonStyle: Button(action: { AudioServicesPlaySystemSound(1026) isActive.toggle() }){…