python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
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 = ....
Suncica Miladinovic
Votes: 0
Answers: 2
SwiftUI Mac: Adding buttonStyle Makes Button Click Propagate to Parent
I am trying to create a situation in a SwiftUI Mac app where when I click a Button inside a parent view, only the Button's action is trigger—not any of the tap gestures attached to its parent.
Here is...
Clifton Labrum
Votes: 0
Answers: 1
SwiftUI sheet presenting on tapping anywhere
I have created a @StateObject from where a Login page is presented:
@StateObject var loginViewModel = //LoginViewModel Name
and There is a Button inside Vstack like this
VStack{
Button(action : {log...
Ae Ri
Votes: 0
Answers: 1
Is there a way to set font tracking (i.e. spacing) inside a custom SwiftUI ButtonStyle?
In SwiftUI you can set font tracking (spacing between letters) on a Text View using the tracking View modifier:
Text("Hello, World!")
.tracking(10)
If you have a Button and apply your cus...
shim
Votes: 0
Answers: 1