Advancement of Technology

In the rapidly evolving world of technology, there is always something new and exciting happening. From groundbreaking advancements in artificial intelligence to cutting-edge developments in the…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Form in SwiftUI

Make a Profile View with the help of a new UI element Form.

Form is a container for grouping controls used for data entry, such as in settings or inspectors. Form can contain sections and will act as a container view. SwiftUI automatically adapts the controls when placed inside a form.

Form is new which is introduced in SwiftUI. SwiftUI renders forms in a manner appropriate for the platform. For example, on iOS, forms appear as grouped lists. Use Section to group different parts of a form’s content.

We are going to create a new project choosing SwiftUI as a User Interface like in the below image…

Choose SwiftUI

Once you create the project, you will see ContentView.swift class in which you will see Text(“Hello, World!”) .

Now, we will take a Form by clicking on + button in the project navigator and drag & drop. So your Content View Struct should look like below

Form View

Section is an affordance for creating hierarchical view content.

Use Section

To make a Profile View like above in the image, you need to use Image, HStack, Text, Spacer & Toggle inside the Form. So your ContentView structure should be like this.

And your view should look like the below image…

I hope you enjoyed reading this post.

If you liked what you read, please leave some claps! and follow me.

Did I get something wrong? Mention it in the comments. I would love to improve.

Thanks

#List #Section #HStack #Image #Text #Toggle #NavigationView #iOS #XCode #SwiftUI #Developer #Technology #TechnicalAdvancement #Blogger

Add a comment

Related posts:

Allowing Theology To Evolve My Faith

Twice a week I have been absorbed in my Theology class I am taking throughout the summer. There is an abound amount of information that goes into the practice, understanding and theory relating to…

1. PAI Distribution

We have heard there has been some confusion around the PANDA program and the ROI returns, and we’d like to take the time to explain to everyone in a little more detail how the program works and how…

The Basics Of Real Estate Investing For Novices And Experts

Are you considering investing in real estate? If so, it is important to take a little time to figure out how the market works before you start spending your hard-earned money. Jumping into a purchase…