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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
@IBAction func showHelp(_ sender: Any) { | |
let ctHelp = CTHelp() | |
ctHelp.new(CTHelpItem(title:"No Text-Image Only", | |
helpText: "", | |
imageName:"SampleFullSizeImage")) | |
ctHelp.new(CTHelpItem(title:"Text and Image", | |
helpText: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", | |
imageName:"SampleSmallerImage")) | |
ctHelp.new(CTHelpItem(title:"No Image-Text Only", | |
helpText: "Eu tempor suscipit dis sed. Tortor velit orci bibendum mattis non metus ornare consequat. Condimentum habitasse dictumst eros nibh rhoncus non pulvinar fermentum. Maecenas convallis gravida facilisis. Interdum, conubia lacinia magnis duis nec quisque.Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", |
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
@IBAction func ShowHelp(_ sender: Any) { | |
let ctHelp = CTHelp() | |
// Optional values to set colors | |
// ctHelp.ctBgViewColor = .white | |
// ctHelp.ctTitleColor = .darkText | |
// ctHelp.ctHelpTextColor = .darkGray | |
// ctHelp.ctActionButtonBGColor = UIColor(red: 28/255, green: 136/255, blue: 197.255, alpha: 1) | |
// ctHelp.ctActionButtonTextColor = .white | |
ctHelp.new(CTHelpItem(title:"No Text-Image Only", |
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
struct NewsFeed: Decodable { | |
let kind: String | |
let data: OuterData | |
struct OuterData: Decodable { | |
let children: [Child] | |
} | |
struct Child: Decodable { | |
let data: InnerData |
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 UIKit | |
struct Post: Decodable { | |
let word: String | |
let meanings:[Meanings] | |
struct Meanings: Decodable { | |
let partOfSpeech: String? | |
let definitions: [Definitions] | |
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
struct Item: Identifiable { | |
let id = UUID() | |
var index: Int | |
static var mockData:[Item] { | |
return (0...2).map{Item(index: $0)} | |
} | |
} | |
struct ContentView: View { | |
@State var items = Item.mockData |
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
struct ContentView: View { | |
@State private var currentMagnification: (CGFloat,CGFloat) = (1,1) | |
@GestureState private var pinchMagnification: (CGFloat,CGFloat) = (1,1) | |
var body: some View { | |
VStack { | |
Circle() | |
.fill(Color.green) | |
.shadow(radius: 20) | |
.frame(width: 100) | |
.scaleEffect(currentMagnification.0 * pinchMagnification.0) |
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
struct Forecast: Codable { | |
let lat: Double | |
let lon: Double | |
let timezone: String | |
let timezoneOffset: Int | |
struct Daily: Codable { | |
let dt: Date | |
let sunrise: Date | |
let sunset: Date | |
struct Temp: Codable { |
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
// | |
// DebugPrint.swift | |
// Deep Links Test | |
// | |
// Created by Stewart Lynch on 2021-02-09. | |
// | |
import Foundation | |
enum DebugPrint { |
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 Foundation | |
struct SalesForce: Codable { | |
struct Records: Codable { | |
struct Attributes: Codable { | |
let type: String | |
let url: String | |
} | |
let attributes: Attributes |
OlderNewer