Skip to main content
0 votes
0 answers
41 views

SwiftUI Button in List works only with press+slide rather than tap

When checking a checkbox Button in List: Click/tap events don't trigger the expected response The associated action button only activates with a press+slide What could be causing this interaction ...
arterzz's user avatar
  • 31
1 vote
0 answers
89 views

No tap animation when pressing a Button inside a ScrollView with SwiftUI

I am writing an application and have a structure similar to the following: ScrollView { VStack { Button(action: { print("hello") }) { Text("...
user2826739's user avatar
1 vote
1 answer
85 views

Connecting a button to .searchable modifier

I have an app with SampleData of country names displayed in a list with the searchable modifier. I also have button on the bottom right of the screen. This is all within the NavigationStack: ...
fbablu's user avatar
  • 13
0 votes
1 answer
182 views

Reduce text and background opacity when Button is disabled

I am learning SwiftUI and currently building a custom button. What I am trying to achieve is, when the button is disabled its opacity should be 0.5 but not the title. The title opacity should be 0.9 ...
thus's user avatar
  • 1,575
-1 votes
1 answer
51 views

Button appears to have an inner and outer area with different actions, how can I make sure only one action is used for both tappable areas

Snapshot of Code and Preview in Xcode Attached is an image with the button and code for reference. Here's also the code in case you'd like to test this out yourself: struct ContentView: View { var ...
eiro's user avatar
  • 3
0 votes
2 answers
329 views

Text disappears in dark mode when tinting borderedprominent button

The button text does not change colors properly when switching between light and dark mode. In light mode it shows up as a black button with white text. in dark mode it just shows a white button with ...
dingomingo's user avatar
0 votes
2 answers
142 views

Rounded button background box color

I'd like to make the. box surrounding my rounded button match the background but it's darkened. I would also like to eliminate the dark circle below the button, which looks like it must be generated ...
Phil Smith's user avatar
0 votes
1 answer
37 views

Why is "toggle()" function not producing the same result as explicitly writing out a toggle?

The following block works: Main File import SwiftUI struct Home: View { @State private var ToDoItems: [ToDoItem] = [ToDoItem(title: "Task", description: "Need to do", urgent: ...
Simon's user avatar
  • 1
2 votes
1 answer
100 views

Can’t make a button tappable parallel to navigationTitle

The button is not tappable as I move it to the extended line of the title. If I move it to somewhere else, it works but I want to place it on the line of Title. But whenever I do it, it does not ...
YJ Kim's user avatar
  • 31
1 vote
0 answers
86 views

SwiftUI Button ListRowBackgroundColor doesn't Change

I'm attempting to recreate a button that simulates the behavior of a NavigationLink inside a List in SwiftUI. However, when tapping the button wrapped inside the List, the listRowBackground color ...
Maximillian's user avatar
0 votes
2 answers
143 views

How do I make my text navigate me to a subpage?

I have the text "Groups" and I want to use NavigationLink to connect it to my GroupsPage subpage and take the user there when they click the Groups text. Edit: This is how it looks with the ...
AppleDev3's user avatar
1 vote
1 answer
170 views

How can i get animation when click a button that in List?

My code is like this: List { Button(action: {}, label: { Text("Button") }) Button(action: {}, label: { Text("...
stul's user avatar
  • 52
1 vote
1 answer
699 views

SwiftUI: Long Press fills button to show progress?

I pieced together this code for a watch app and it kind of works but it's not perfect. (1) The fill does not match exactly, it starts outside the bounds of the buttons view but I can't figure out how ...
GarySabo's user avatar
  • 6,750
0 votes
0 answers
39 views

screen not navigating to other screen based on conditions, on button click

I want to navigate to ChatScreen() based on conditions, when click on right group, print statement is showing "group found" but its not navigating: List(viewModel.danceGroups) { group in ...
Deepanshu Kashyap's user avatar
0 votes
2 answers
107 views

Using sheet for presenting different views on 2 buttons actions are presenting view incorrect view

enum ActiveSheet: Identifiable { case first, second var id: Int { return hashValue } } struct ContentView: View { @State var activeSheet: ActiveSheet? var body: some ...
Kunal's user avatar
  • 3

15 30 50 per page
1
2 3 4 5