SwiftUI: Fewer disturbances using DND

Namaste everyone.

I am an ios developer and an ardent learner. It is going to be a series of articles in which I intend to share my learnings about SwiftUI from basic to what I become at the end of the series. Hope to ace it along with you guys. As I believe in “In vain have you acquired knowledge if you have not imparted it to others” — Deuteronomy Rabbah. So let us learn together.

Here I am going to explain the efficiency of SwiftUI with the concept that I would like to introduce as mentioned below:

“SwiftUI: Fewer disturbances using DND”.

So does this mean we get disturbed by the long process and long hours of work? No, of course not. We love to work but what we would love more is to work smarter and quicker so here all it means is to increase our efficiency using the DND feature with Apple’s new framework called SwiftUI. This framework is an amazing upheaval, which is built upon the power of Swift and lets us build user interfaces across all Apple platforms. This framework does not consume our extra time and energy thus making us more productive.

It allows us to build UI for any Apple Device using one set of tools and APIs. SwiftUI functions flawlessly with new Xcode design tools to keep the code and design in sync. This feature of declarative syntax is easy to read and natural to write.

Did you guys miss it? No problem, the full form of DND is hidden in the above paragraph. It stands for:

Declarative Syntax

SwiftUI uses a very expressive syntax that becomes self-explanatory with little experience in the framework. With this, you can simply state what your user interface should do. For example, for a normal text written in bold and with a foreground color to be blue, you would simply write:

Text(“Namaste”)

.fontWeight(.bold)

.foregroundColor(.blue)

Your code is simpler and easier to read than ever before, saving you time and maintenance. This declarative style even applies to complex concepts like animation.

Native on all Apple Devices

SwiftUI is truly native and is introduced to write codes that work efficiently on all the platforms.

It can access all the native functionalities and technologies of any platform and thus delivering an interacting user interface experience and that too at a lightning speed.

Design Tools

As you start working with design canvas, everything you edit is in sync with the code in the adjoining editor. Code is instantly visible as a preview as you type, Xcode keeps on recompiling after every change you make is much faster to preview a single screen than running the app on the simulator after every small change in the code.

Some of the features of the tool are named below:

Drag and drop

Following the old ritual of drag and drop views Apple has again optimized it immensely with the inspector now containing all the modifiers, views, images, snippets, and colors.

Previews

You can now create one or many previews for the UI and test upon different conditions like screen sizes, localization, dark mode, and many more.

Summing up the introduction of the framework here, follow for more.

I will try posting unfailingly.

Keep Learning and help me learn too.

Namaste!

--

--

--

iOS developer with 2+ experience. Like to code. Love building solutions that can be extended with only a few keystrokes.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to Do Full-Screen Development With Xcode and the Simulator

Developing with Xcode and the Simulator in full-screen mode

Creating an iOS Widget for your Wallet app

Using Dependency Injection to Mock Network API Service in View Controller-Alfian Losari

Curated iOS Interview Questions Series— Part 1

How we use feature flagging in client apps at Freetrade

Using Enums with GraphQL and Swift

Combine debugging using operators in Swift

DS & Algorithm (Linked List)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ashish Singh

Ashish Singh

iOS developer with 2+ experience. Like to code. Love building solutions that can be extended with only a few keystrokes.

More from Medium

Using the ViewBuilder Attribute to Implement SwiftUI Views in Methods

Read local file with Combine

SwiftUI Tutorial — How to use a ProgressView with URLSession

Generic Text Field in SwiftUI

Macbook on Desk