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)
SwiftUI view with rounded corners AND border
ZStack {
VStack {
Text("some text")
Button("Ok") {}
.foregroundColor(.cyan)
...
soleil
Votes: 0
Answers: 2
View Modifier messing with animations
I've been looking to add a loading indicator to my project, and found a really cool animation here. To make it easier to use, I wanted to incorporate it into a view modifier to put it on top of the cu...
greatxp117
Votes: 0
Answers: 1
TextField ViewModifier not conforming to ViewModifier?
I have this code in one of my views:
struct TextFieldClearButton: ViewModifier {
@Binding var text: String
func body(content: Content) -> some View {
HStack {
conten...
zumzum
Votes: 0
Answers: 2
In SwiftUI, is there a way to preserve the type when applying a view modifier?
My question is simply as the title states. I want to take some View, apply a view modifier to it, and still be able to keep it as that original type instead of it becoming a some View.
Say we have a s...
Tim Fuqua
Votes: 0
Answers: 3