Skip to main content

All Questions

Tagged with
-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 ...
Vladimir Despotovic's user avatar
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: "...
kocaman's user avatar
  • 41
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 ...
user1342352532's user avatar
-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 ...
Swift's user avatar
  • 1,172
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 ...
B N's user avatar
  • 21
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 ...
Guitar123's user avatar
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....
Swift's user avatar
  • 1,172
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. ...
Keith's user avatar
  • 4,543
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 ...
JJ Trejo's user avatar
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 „...
Jamie_Gerber's user avatar
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 ...
Bike Smith's user avatar
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 ...
Fabio Pohl's user avatar
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 ...
Kadir GÜVEN's user avatar
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 ...
user45723's user avatar
  • 123
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. ...
Amirca's user avatar
  • 283

15 30 50 per page
1
2 3 4 5
70