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.
- Download Xcode (around 30 GBs)
- Download SF Symbols (for customizable icons)
- Download GitHub Desktop (optional)
The first module explains how to navigate the Xcode interface, and organizing files in the project navigator.
- 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.
- 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.
This module explains how to customize list views using the @State
attribute.
- 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.
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.
When using SwiftUI, you can individually animate changes to views, or to a view’s state
, no matter where the effects are.
Learning how to connect new views with existing ones, and exploring how to make device-responsive app designs using "composed" views.
- Creating a "Category" view: with a featured section and 2 different categories highlighting similar locations.