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
| public struct List<SelectionValue, Content> : View where SelectionValue : Hashable, Content : View { | |
| public init(selection: Binding<Set<SelectionValue>>?, @ViewBuilder content: () -> Content) | |
| } |
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 PlaygroundSupport | |
| struct Name: Identifiable, ExpressibleByStringLiteral { | |
| var name: String | |
| public init(stringLiteral value: Swift.StringLiteralType) { | |
| self.name = value | |
| } | |
| var id: String { return name } | |
| } |
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
| //: [Previous](@previous) | |
| import SwiftUI | |
| import PlaygroundSupport | |
| enum AlertTypes: String, Identifiable { | |
| case simple = "A Simple Alert" | |
| case complex = "A Complex Alert" |
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
| //: [Previous](@previous) | |
| import SwiftUI | |
| import UIKit | |
| import PlaygroundSupport | |
| struct IdentifiableActionSheet : View { | |
| @State var displaySheet: SheetTypes? = nil | |
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
| //: [Previous](@previous) | |
| import SwiftUI | |
| import PlaygroundSupport | |
| protocol Nameable { | |
| var name: String { get } | |
| } | |
| struct Name: Nameable { |
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
| //: [Previous](@previous) | |
| import Foundation | |
| import SwiftUI | |
| import UIKit | |
| import PlaygroundSupport | |
| // This doesnt work because the protocol has an assoicated Type | |
| // To understand more | |
| // https://chariotsolutions.com/screencast/philly-ete-2019-rob-napier-generic-swift-it-isnt-supposed-to-hurt/ |
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
| //: A UIKit based Playground for presenting user interface | |
| import SwiftUI | |
| import UIKit | |
| import PlaygroundSupport | |
| import Combine | |
| class ObservingSource: BindableObject { | |
| var someString: String = "" | |
| var willChange = PassthroughSubject<String,Never>() |
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 XCTest | |
| import Combine | |
| import Entwine | |
| import EntwineTest | |
| class EntwineTestSchedulerExampleTests: XCTestCase { | |
| func testSchedulerInjection() { | |
| let scheduler = TestScheduler(initialClock: 0) | |
| var didSink = false |
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
| // | |
| // Emoji.swift | |
| // Tipski | |
| // | |
| // Created by Paul Wood on 10/29/16. | |
| // Copyright © 2016 Paul Wood. All rights reserved. | |
| // | |
| // Assumes you have a file named emojis.json as a resource | |
| // That file can be found here: https://github.com/muan/emoji/blob/gh-pages/javascripts/emojilib/emojis.json | |
| // Thanks so much to the contributors of emojilib! |
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
| #!/usr/bin/env xcrun swift | |
| import Foundation | |
| print("This is a swift script!") | |
| print("Arguments: \(ProcessInfo.processInfo.arguments)") |