Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
112 views

I have a form being loaded inside a navigation stack and I'm showing an image and title in the first form section with the code below: Form { Section { VStack { Image("...
ShadesJeff's user avatar
0 votes
0 answers
69 views

I need view like this in order to have fixed size form with scrollable capability. I have disclosure groups, buttons and textfields inside form. struct ContentView: View { var body: some View { ...
spt025's user avatar
  • 2,324
0 votes
1 answer
51 views

I`ve adapt official Apple tutorial app for my needs. There is a ContentListView that displays a list of recipes on one side and a form to edit the selected recipe on the other. The form includes a ...
Captain_Apollo's user avatar
3 votes
1 answer
68 views

This is my code: Form { Section {} // regular section no background Section { // <--- want this section to have a background color Text("Hello") } .background(Gradient(...
Yuda's user avatar
  • 45
3 votes
2 answers
4k views

I am using a Form in SwiftUI based on a tutorial from YouTube, and I have placed some components inside it. However, when I tap the button, it doesn't show the tap animation (For example, when I tap a ...
NoobOfCpp's user avatar
4 votes
1 answer
1k views

I'm not able to change the background color of a Form in SwiftUI for iOS < 16. It always takes default form backgroundcolor depending on which color scheme is selected in the iPhone settings. All ...
floro's user avatar
  • 41
1 vote
1 answer
147 views

Is there possibility to change background color of this view? Note: I dont want to change form sections color, i want to change background color of view. `.background(Color.red) does not effect. init()...
Raycon's user avatar
  • 13
0 votes
1 answer
445 views

I have this space between the top of the screen and my text input box. How can I reduce this space? I don't want to bring the input box up too far as it will be obstructed by the notch. However, I ...
PhpCoder223's user avatar
0 votes
1 answer
169 views

I have a form with 2 buttons. Now I would like to have a little space between these two buttons. Exactly like in this example: Does anyone know how to implement this? I appreciate any help!
SwiftUI_Max's user avatar
-2 votes
2 answers
589 views

I want to create a certain amount of TextFields on a view based on the number the user inputs. For Example, if the user inputs 5 I would like to display 5 TextFields on the view. I was thinking about ...
ppraveen's user avatar
1 vote
0 answers
1k views

I would like to make my list in a form editable and sortable with the editMode. I've already tried using .environment(.editMode, .constant(.active)) on the list or on the ForEach loop, but ...
SwiftUI_Max's user avatar
0 votes
1 answer
588 views

I'm trying to conditionally render two Forms based on the selection from a segmented picker. It all works fine when there's no animations, but the moment I add them in, the first Form seems to break. ...
JustAnotherCarGuy's user avatar
0 votes
1 answer
322 views

I have been trying to animate the transition between 2 views that contain Form views in SwiftUI. However the layout breaks only when the animation applies. This is a fully reproducible example. (Only ...
gh123man's user avatar
  • 1,414
0 votes
1 answer
368 views

In iOS 14 I've following code which prefills all textfields from the coredata model struct EditSimpleSearchView: View { @Environment(\.managedObjectContext) private var viewContext @...
user4150758's user avatar
1 vote
2 answers
1k views

I want to create a ViewModifier, which when applied to a VStack it makes its style look like a List inside a Form, as presented in the image below. I have multiple custom scenarios where Lists don't ...
Liviu's user avatar
  • 172
0 votes
1 answer
1k views

I want when I scroll up the Text ("Hello") will stay fixed, and the text "Welcome " will move up to be on the same line as Text("Hello"). Hope you can give me some ...
David's user avatar
  • 57
1 vote
1 answer
710 views

I've been messing with this for quite some time now and cannot for the life of me figure out where this little white line is coming from. I tried setting .padding(0) and using a .frame() but nothing ...
Joe Scotto's user avatar
  • 11.1k
1 vote
1 answer
660 views

I have a trouble trying to put my Picker inside NavigationLink child struct. MyProblem As you see after some transition (Main Page -> Testing Page -> Picker) and choosing any pickers desire ...
Isaac's user avatar
  • 508
6 votes
0 answers
548 views

Hi there I have a tricky problem to solve with SwiftUI in Xcode 12.4 (iOS 14): given I have a Form with numerous sections and TextEditors, this form having a .toolbar modifier (bottom bar) with some ...
pprochazka72's user avatar
2 votes
1 answer
3k views

I have three files: AddAssignment, ViewAssignment and Task. A button is clicked on AddAssignment.swift which successfully appends form data to an array inside of Task.swift. However, in a file ...
fesari's user avatar
  • 33
1 vote
1 answer
355 views

even though the binding properties in fileMover are set to true. file mover is not getting executed. Below is the sample code i have used. Any leads will be helpful. Thanks in advance. var body: ...
sharath kumar's user avatar
1 vote
2 answers
1k views

What is wrong with the following test code ? When I enter a character into the field, the didSet goes into a recursive loop. If the inout + & are removed, the code functions as expected with ...
altimes's user avatar
  • 470
3 votes
2 answers
1k views

I have an edit view that is presented by a NavigationLink. It takes a recipe, which is held in a manager that has an array of them. App Code (copy pasta should run): import SwiftUI @main struct ...
raphael's user avatar
  • 447
2 votes
3 answers
797 views

I have a TextField as search box.I want to make it autosearch i.e whenever i will enter a letter in the TextField, i should get the result without press a enter.Here is my code: TextField("Search&...
Santanu's user avatar
  • 347
1 vote
0 answers
477 views

I want to use mdc components in my SwiftUI app. I created a class with protocol UIViewRepresentable, but I would like to modify the height to some constant or maybe remove inner padding. func ...
Bumaza's user avatar
  • 113