Skip to content

A list of guides of Swift based in playgrounds: Basic Swift, SwiftUI & Combine

License

Notifications You must be signed in to change notification settings

asam139/LearningSwift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LearningSwift

A list of guides of Swift based in playgrounds

Swift Playground

This playground provides a modified version of Apple’s playground Swift Tour tutorial.

Exercises

The main playground contains a section with multiple exercises in order to consolidate learning.

SwiftUI Playground

This playground provides a version of Apple’s Building Lists and Navigation tutorial.

Implementation

A UIHostingController can be used in a Playground Live View like this:

PlaygroundPage.current.liveView = UIHostingController(rootView: PlaygroundRootView())

The given root view must be public, along with its init() and body:

public struct PlaygroundRootView: View {
    public init() {}
    
    public var body: some View {
        LandmarkList()
    }
}

Execution

Press the blue Play button next to the PlaygroundPage.current.liveView line or type ⇧⌘↵ to run the Playground.

Combine Playground

This playground will help you to get started with Combine - Apple Developer Documentation.

  • What is Combine?
  • Publishers & Subscribers
  • Rules of subscriptions
  • Foundation and Combine
  • @Published property and bindings
  • Memory management explained with AnyCancellable
  • Flatmap and matching error types
  • Combining Publishers
  • Future and Promises
  • Custom Publisher and UIKit extensions
  • Debugging publishers

Requirements

  • Xcode 11

About

A list of guides of Swift based in playgrounds: Basic Swift, SwiftUI & Combine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages