SwiftUI For Dummies
eBook - ePub

SwiftUI For Dummies

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

SwiftUI For Dummies

About this book

The simplest way to create world-class apps

Have a unique app idea but worried you don't quite have the coding skills to build it? Good news: You can stop fretting about someone beating you to market with the same idea and start work right now using SwiftUI. SwiftUI is a gateway app development framework that has become one of the best ways for fledgling developers to get iOS apps off the ground without having to become a coding expert overnight.

SwiftUI For Dummies makes that process even faster, providing a friendly introduction to the SwiftUI and Swift programming language and helping you feel right at home creating and building with playgrounds. The book also covers the frameworks and APIs that make it so easy to create smooth, intuitive interfaces—just dive right in and have fun!

  • Combine projects into workspaces
  • Employ Xcode editing tools
  • Use constants and variables
  • Test your code on iOS Simulator

Time is of the essence, and with SwiftUI For Dummies, it's also on your side. Get going with this friendly guide today, and you'll be celebrating the successful launch of your app way before you thought possible!

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access SwiftUI For Dummies by Wei-Meng Lee in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming. We have over one million books available in our catalogue for you to explore.

Information

Publisher
For Dummies
Year
2020
Print ISBN
9781119652687
eBook ISBN
9781119652700
Part 1

Getting Started with Swift and SwiftUI

IN THIS PART …
Get a head start in using SwiftUI and build your first iOS app.
Get acquainted with the syntax of the Swift programming language so that you’re prepared to dive into the world of SwiftUI.
Chapter 1

Introducing SwiftUI

IN THIS CHAPTER
check
Understanding what SwiftUI is
check
Getting the tools for SwiftUI
check
Comparing UIKit to SwiftUI
check
Using the preview canvas and Live Preview
check
Understanding the various files in a SwiftUI project
I know the feeling of being on the verge of learning something new. If you’re anything like me, you’re eager to try things out and see how it feels. And that’s exactly what you do in this chapter!
In this chapter, I explain what SwiftUI is, show you how SwiftUI has changed the user interface (UI) development paradigm, and explain how SwiftUI makes the process easier going forward. Then I tell you how you can get started with the necessary tools. Finally, with the tools that you’ve installed, you create your first iOS application using SwiftUI, and learn how the various components in your project work together as a whole.

Understanding What SwiftUI Is

SwiftUI is a declarative programming framework for developing UIs for iOS, iPadOS, watchOS, tvOS, and macOS applications. In fact, SwiftUI was invented by the watchOS group at Apple.
Before SwiftUI was introduced, most developers used UIKit and Storyboard (which is still supported by Apple in the current version of Xcode, as of this writing [version 11.4.1]) to design a UI. Using UIKit and Storyboard, developers drag and drop View controls onto View Controllers and connect them to outlets and actions on the View Controller classes. This model of building UIs is known as Model View Controller (MVC), which creates a clean separation between UI and business logic.
The following shows a simple implementation in UIKit and Storyboard. Here, a Button and Label view have been added to the View Controller in Storyboard; two outlets and an action have been created to connect to them:
class ViewController: UIViewController {
@IBOutlet weak var lbl: UILabel!
@IBOutlet weak var button: UIButton!
@IBAction func btnClicked(_ sender: Any) {
lbl.text = "Button tapped"
}
For laying out the views, you use auto-layout to position the button and label in the...

Table of contents

  1. Cover
  2. Table of Contents
  3. Introduction
  4. Part 1: Getting Started with Swift and SwiftUI
  5. Part 2: Understanding the Basics of SwiftUI
  6. Part 3: Exploring with SwiftUI in More Detail
  7. Part 4: Performing Animations and Drawings
  8. Part 5: The Part of Tens
  9. Appendix: Code Snippets for Common SwiftUI Views
  10. Index
  11. About the Author
  12. Advertisement Page
  13. Connect with Dummies
  14. End User License Agreement