Skip to content

Completed the SwiftUI tutorial, creating and combining views, building lists and navigation, and handling basic user inputs.

Notifications You must be signed in to change notification settings

taishiwalden/Landmarks

Repository files navigation

Landmarks

Completed the SwiftUI tutorial, creating and combining views, building lists and navigation, and handling basic user inputs. I followed the Apple Developer's course which can be found here.


Dependencies & resources
  1. Download Xcode (around 30 GBs)
  2. Download SF Symbols (for customizable icons)
  3. Download GitHub Desktop (optional)

Glance at the final product

landmarks-swift


Swift UI Essentials

Creating and Combining Views

The first module explains how to navigate the Xcode interface, and organizing files in the project navigator. Screen Shot 2022-02-08 at 10 40 55 AM

Core Concepts:
  • The @main attribute identifies the app’s entry point.
  • The structure’s body property returns one or more scenes, which in turn provide content for display.
  • An app that uses the SwiftUI app life cycle has a structure that conforms to the App protocol.
  • You can use any combination of editors: the source editor, the canvas, or the inspectors.

Building Lists and Navigation

Screen Shot 2022-02-08 at 10 39 37 AM

Core Concepts:
  • Using a JSON file to dynamically store and transmit data objects consisting of attribute–value pairs and arrays.
  • Build a list of meaningful locations that users can click to view more detailed data about.
  • Using Decodable component of the Codable protocol to read data from JSON files.

Handling User Inputs

This module explains how to customize list views using the @State attribute.

Core Concepts:
  • The @State attribute is a value, or a set of values, that can change over time, and that affects a view’s behavior, content, or layout.
  • Because you use state properties to hold information that’s specific to a view and its subviews, you always create state as private.
  • An observable object is a custom object for your data that can be bound to a view from storage in SwiftUI’s environment. SwiftUI watches for any changes to observable objects that could affect a view, and displays the correct version of the view after a change.
  • Add the @Published attribute to publish any changes to its (observable object) data, so that its subscribers can pick up the change.
  • Use the @StateObject attribute to initialize a model object for a given property only once during the life time of the app.

Drawing and Animation

Drawing Paths and Shapes

Learned the process of creating a badge & icon by combining paths and shapes, using the overlaid symbol, varying the amount of repetition, or changing the various angles and scales. To create geometric shapes and paths, you start by import CoreGraphics, a framework that allows you to handle path-based drawing, transformations, color management, patterns, gradients and shadings, image data management, and parsing.


Animating Views and Transitions

When using SwiftUI, you can individually animate changes to views, or to a view’s state, no matter where the effects are. swift-animation-preview


App Design and Layout

Composing Complex Interfaces

Learning how to connect new views with existing ones, and exploring how to make device-responsive app designs using "composed" views. Swift-tutorial-categories

  1. Creating a "Category" view: with a featured section and 2 different categories highlighting similar locations.

About

Completed the SwiftUI tutorial, creating and combining views, building lists and navigation, and handling basic user inputs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages