This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) { | |
// ... | |
guard fetchedElements.last! != knownOldestElement else { return } | |
// Fetch next page | |
// ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow to build and deploy site to Github Pages using Hugo | |
# Name of Workflow | |
name: github pages | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ master ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import MapKit | |
// Main view | |
struct ContentView: View { | |
// Provides an annotation immedidately (synchronously) | |
var synchronousAnnotationMaker = SynchronousAnnotationMaker() | |
var body: some View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import MapKit | |
// Main view | |
struct ContentView: View { | |
// Provides an annotation after some delay (asynchronously) | |
@ObservedObject var asynchronousAnnotationMaker = AsynchronousAnnotationMaker() | |
var body: some View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import MapKit | |
// Main view | |
struct ContentView: View { | |
// Provides an annotation after some delay (asynchronously) | |
@ObservedObject var asynchronousAnnotationMaker = AsynchronousAnnotationMaker() | |
var body: some View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ContentView: View { | |
@State private var appSetupState = "App NOT setup ☹️" | |
// #1 | |
@AppStorage("needsAppOnboarding") private var needsAppOnboarding: Bool = true | |
var body: some View { | |
// #2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension ContentView { | |
private var mainView: some View { | |
VStack { | |
Spacer() | |
Button(action: { | |
needsAppOnboarding = true | |
}) { | |
Text("Reset Onboarding") | |
.padding(.horizontal, 40) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct OnboardingView: View { | |
var body: some View { | |
// #1 | |
VStack { | |
Spacer(minLength: 150) | |
Image(systemName: "wand.and.stars") | |
.resizable() | |
.aspectRatio(contentMode: .fit) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct OnboardingButton: View { | |
// #1 | |
@AppStorage("needsAppOnboarding") var needsAppOnboarding: Bool = true | |
var body: some View { | |
GeometryReader { proxy in | |
LazyHStack { | |
Button(action: { | |