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
| // | |
| // DarwinNotificationCenter.swift | |
| // | |
| // Copyright © 2017 WeTransfer. All rights reserved. | |
| // | |
| import Foundation | |
| /// A Darwin notification payload. It does not contain any userInfo, a Darwin notification is purely event handling. | |
| public struct DarwinNotification { |
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
| //: Playground - noun: a place where people can play | |
| import XCTest | |
| class MyTests: XCTestCase { | |
| lazy var testData: [Int] = { | |
| return (0..<1000).map { Int($0) } | |
| }() |
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 protocol OptionalType { | |
| associatedtype Wrapped | |
| var value: Wrapped? { get } | |
| } | |
| extension Optional: OptionalType { | |
| public var value: Wrapped? { | |
| return self | |
| } | |
| } |
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 Combine | |
| final class Keyboard: ObservableObject { | |
| // MARK: - Published Properties | |
| @Published var state: Keyboard.State = .default | |
| // MARK: - Private Properties |
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
| Using XCode with github | |
| ======================= | |
| 0. These steps were pulled from the documentation on github | |
| 1. Create an empty repository on GitHub | |
| do not initialize with a README | |
| 2. Note the SSH path to the new repository | |
| git@github.com:quoha/derp-octo-sansa.git |
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
| //------------------------------------------------------------------------ | |
| // The SwiftUI Lab: Advanced SwiftUI Animations | |
| // https://swiftui-lab.com/swiftui-animations-part1 (Animating Paths) | |
| // https://swiftui-lab.com/swiftui-animations-part2 (GeometryEffect) | |
| // https://swiftui-lab.com/swiftui-animations-part3 (AnimatableModifier) | |
| //------------------------------------------------------------------------ | |
| import SwiftUI | |
| struct ContentView: 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
| // Safely Modifying The View State (SwiftUI) | |
| // https://swiftui-lab.com | |
| // https://swiftui-lab.com/state-changes | |
| import SwiftUI | |
| struct CustomView: View { | |
| var body: some View { | |
| NavigationView { |
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 | |
| fileprivate extension DateFormatter { | |
| static var month: DateFormatter { | |
| let formatter = DateFormatter() | |
| formatter.dateFormat = "MMMM" | |
| return formatter | |
| } | |
| static var monthAndYear: DateFormatter { |
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 PlaygroundSupport | |
| import SwiftUI | |
| struct DocsView: View { | |
| var body: some View { | |
| iconBody.frame(height: 200).mask( | |
| ZStack(alignment: .bottomLeading) { | |
| Rectangle() | |
| .fill(Color.white) | |
| Text("DOCs") |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>NSExceptionDomains</key> | |
| <dict> | |
| <key>www.howsmyssl.com</key> | |
| <dict> | |
| <key>NSExceptionMinimumTLSVersion</key> | |
| <string>TLSv1.3</string> |