All Questions
1,039
questions
-1
votes
1
answer
44
views
In Swift UIKit, how to add two button images inside a table cell?
I need two images buttons to be clickable inside a certain cell (not all cells), instead of the text. How can I do this? I have the cell extension, and the image "the_icon" exists (I can see ...
1
vote
1
answer
35
views
Allow to select multiple buttons
struct Question {
var title: String
var options : [String]
}
struct SimpleQuestions: View {
@State var selectedOption = ""
@State var question = Question(title: "...
4
votes
1
answer
110
views
Button in UICollectionViewCompositionalLayout cell behaviour
I have a UICollectionViewCompositionalLayout. My app is similar to the App Store. In the real App Store, when I want to scroll the "UICollectionViewCell" with the app catalog and my finger ...
-2
votes
1
answer
90
views
Unable to get search list selected item id in SwiftUI
I have one api for showing All list and another API for showing search word List but here from all list i am getting selectedDataID but from search list selected item not getting selectedDataID. how ...
1
vote
1
answer
65
views
How to reference a button created in a foreach loop
How to reference a button created in a for each loop
I have the following code where I apply a custom buttonStyle to a set of buttons created using a ForEach loop. I’m trying to make it so that two ...
0
votes
0
answers
25
views
SwiftUI assistance with making the background a tappable object on Apple Watch
I currently have a small bit of code set up where I'm looking to be able to tap the button and perform an action while tapping the background of the button performs a different action. I seem to have ...
0
votes
1
answer
150
views
How to show one view on another view in SwiftUI
I have created one green coloured view with back button and imageview and two texs and search button. now if i click on searchBtn i need to show one white coloured view with textfield and close button....
0
votes
0
answers
58
views
How Do you make a button group with straight middle buttons and rounded first and last buttons in SwiftUI [duplicate]
I have a view that contains this and I'm trying to make a straight button with rounded ends. Each the buttons would directly connect to each other. This view simply gets a list of SF button names. ...
0
votes
1
answer
78
views
Is there a way to make a button have two separate actions depending on if it’s been tapped or long pressed? [duplicate]
I’m trying to make a button in Swift and make it so it does two separate actions depending on if you’ve tapped it, or long pressed it. But I also want it to open a page ONLY once you’ve released the ...
0
votes
1
answer
68
views
Swift: Dismissing sheet doesn’t work after hitting Button
After clicking the „Hinzufügen" button (its German), closing the "AddView" with the „Fertig" button no longer works. However, if „Hinzufügen" was not clicked beforehand, the „...
1
vote
1
answer
50
views
have a button in a tableview cell print something
In my swift code below it features a button in a tableview cell. The problem is when i click on the button nothining is being printed. I dont know what to do next the button is connected and should ...
0
votes
1
answer
97
views
Re-enable button based on date in SwiftUI
I'm in the process of building a habit tracker and I've come across a problem. In my app there is a button that you can click to indicate that you have completed your task. As soon as this button is ...
0
votes
1
answer
30
views
I can't display alert when I pressed my recalculate button
I designed an app in iOS. I have 2 viewcontroller and in secondview there is a button to press recalculate. I want to show alert message to ask "Are you sure to recalculate" or something ...
1
vote
1
answer
148
views
Perform button action after press button animation
I set a ButtonStyle to a button. On this button I set an animation with scale effect on pressing the button. Is there a way to perform the action only after the animation was completed or maybe with a ...
0
votes
0
answers
35
views
Applying Corner Radius to NavigationStack: Restricted Interaction Areas
I tried to set a cornerRadius for the NavigationStack, but it caused the touch area to be limited to the original view position. To put it simply, when the slider is closed, tapping it won't open it. ...