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
REM http://www.msfn.org/board/topic/119612-how-to-install-a-font-via-the-command-line/ | |
@ECHO OFF | |
TITLE Adding Fonts.. | |
REM Filename: ADD_Fonts.cmd | |
REM Script to ADD TrueType and OpenType Fonts for Windows | |
REM By Islam Adel | |
REM 2012-01-16 | |
REM How to use: |
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 UIKit | |
struct NoClipText: UIViewRepresentable { | |
typealias UIViewType = NoClipLabel | |
let text: String | |
let font: UIFont | |
let clipExtension: EdgeSizes |
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 | |
struct OverlappingImage: View { | |
let uiImage: UIImage | |
let xShift: CGFloat | |
let yShift: CGFloat | |
let newAspect: CGFloat | |
init(_ uiImage: UIImage, top: CGFloat = 0, bottom: CGFloat = 0) { | |
self.uiImage = uiImage |
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 | |
enum CustomColorScheme: Int, CaseIterable, Identifiable, Codable { | |
static var defaultKey = "customColorScheme" | |
static var defaultValue = CustomColorScheme.system | |
case system = 0 | |
case light = 1 | |
case dark = 2 | |
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 | |
import AVFoundation | |
@available(iOS 10.0, *) | |
extension AVSpeechSynthesizer { | |
func speakIPA(_ ipaString: String, voiceIdentifier: String, willSpeak: ((String) -> Void)? = nil) { | |
//Set the audio session to playback to ignore mute switch on device | |
do { | |
try AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playback, options: [.interruptSpokenAudioAndMixWithOthers, .duckOthers]) | |
} catch { |
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
// | |
// LazyDataVStack.swift | |
// | |
// | |
// Created by Ryan Lintott on 2021-03-31. | |
// | |
import SwiftUI | |
import CoreData |
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
// | |
// InfoDictionary.swift | |
// FrameUp | |
// | |
// Created by Ryan Lintott on 2021-05-11. | |
// | |
import SwiftUI | |
struct InfoDictionary { |
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 | |
struct ContentView: View { | |
@State private var pictureExpanded = false | |
var body: some View { | |
VStack(alignment: .leading, spacing: 20.0) { | |
Text("Once upon a time there was a turtle named George who made friends with a giraffe at the local water park and then they went on lots of adventures together.") | |
Button { |
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
// | |
// LayoutThatFits.swift | |
// WWDC22Experiments | |
// | |
// Created by Ryan Lintott on 2022-06-08. | |
// | |
import SwiftUI | |
struct LayoutThatFits: Layout { |
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
// | |
// FlippableView.swift | |
// FrameUpExample | |
// | |
// Created by Ryan Lintott on 2022-07-11. | |
// | |
import SwiftUI | |
struct FlippableView: View { |
OlderNewer