skip to Main Content

How can I add two images (one at the left and one on the right side) in a button in Xcode programaticly? I need also a title of a button

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…

VIEW QUESTION

Xcode – SwiftUI's keyboardShortcut is not working if Button has a buttonStyle

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() }){…

VIEW QUESTION
Back To Top
Search