This file contains 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
// | |
// SelectedItems.swift | |
// OrderedList | |
// | |
// Created by Paul Wood on 8/18/19. | |
// Copyright © 2019 Paul Wood. All rights reserved. | |
// | |
import SwiftUI | |
import Combine |
This file contains 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
// | |
// SelectedItems.swift | |
// OrderedList | |
// | |
// Created by Paul Wood on 8/18/19. | |
// Copyright © 2019 Paul Wood. All rights reserved. | |
// | |
import SwiftUI | |
import Combine |
This file contains 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
//: [Previous](@previous) | |
import SwiftUI | |
import Combine | |
import PlaygroundSupport | |
class Context: ObservableObject { | |
@Published var selectedItems: Set<String> | |
@Published var items: Array<String> | |
This file contains 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
// | |
// ContentView.swift | |
// OrderedList | |
// | |
// Created by Paul Wood on 8/18/19. | |
// Copyright © 2019 Paul Wood. All rights reserved. | |
// | |
import SwiftUI | |
import Combine |
This file contains 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
/// Just a Holder for a persistentContainer that is lazily loaded | |
class TestPersistentContainer { | |
lazy var persistentContainer: NSPersistentContainer = { | |
let bundle = Bundle(for: CoreDataService.self) | |
let modelURL = bundle.url(forResource: CoreDataModelName, withExtension: "momd")! | |
let mom = NSManagedObjectModel(contentsOf: modelURL)! | |
let container = NSPersistentContainer(name: "LateralModel", | |
managedObjectModel: mom) | |
let description = container.persistentStoreDescriptions.first! | |
description.url = URL(fileURLWithPath: "/dev/null") |
This file contains 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
// | |
// ContentView.swift | |
// FakeOvercast WatchKit Extension | |
// | |
// Created by Paul Wood on 8/8/19. | |
// Copyright © 2019 Paul Wood. All rights reserved. | |
// | |
import SwiftUI | |
import SFSafeSymbols |
This file contains 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
//: [Previous](@previous) | |
import Foundation | |
import SwiftUI | |
import Combine | |
//: Current Value Subject is a value, a publisher and a subscriber all in one | |
let currentValueSubject = CurrentValueSubject<Bool, Never>(true) | |
print(currentValueSubject.value) |
This file contains 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 PlaygroundSupport | |
struct BoolHolder: View { | |
@State var boolProperty: Bool = false | |
var body: some View { | |
VStack{ | |
if boolProperty { |
This file contains 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
//: [Previous](@previous) | |
import SwiftUI | |
import PlaygroundSupport | |
struct PhotoPickerDisplayer: View { | |
@State var presentation: Bool = false | |
@State var selectedImage: UIImage? = nil | |
This file contains 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
//: [Previous](@previous) | |
import SwiftUI | |
import PlaygroundSupport | |
struct SiriShortcutsActionCard<U>: View where U : StringProtocol { | |
let action: () -> () | |
let onMore:() -> () | |
let iconImage: AnyView |