72 questions
1
vote
1
answer
69
views
How to make SwiftUI Widget buttons fill their container height when using GeometryReader with calculated row heights?
I'm building an iOS Widget (WidgetKit) with a 2×2 button grid using GeometryReader to calculate row heights. The buttons should fill their
containers completely and have equal heights, like Apple's ...
0
votes
2
answers
531
views
How to make a Liquid Glass Next button as a Circle?
I'm trying to create a Next button (as a right chevron) in the toolbar that looks identical to the iOS 26 back button (with the left chevron) in the new Liquid Glass style. But all my solutions ...
0
votes
1
answer
68
views
How to make a Button work inside a ScrollView but outside of the ScrollView's bounds in SwiftUI?
I observed a weird behavior and I believe it's a bug in SwiftUI but maybe it's not or someone knows a way to fix it.
By default, overlays have the same size as the view they are attached to in SwiftUI....
0
votes
0
answers
47
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 ...
1
vote
0
answers
133
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("...
1
vote
1
answer
123
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:
...
0
votes
1
answer
345
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 ...
-1
votes
1
answer
79
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 ...
0
votes
2
answers
407
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 ...
0
votes
2
answers
154
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 ...
0
votes
1
answer
39
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: ...
2
votes
1
answer
116
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 ...
2
votes
0
answers
105
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 ...
0
votes
2
answers
148
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 ...
1
vote
1
answer
179
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("...