View addfont.cmd
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: |
View OverlappingImage.swift
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 |
View NoClipText.swift
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 |
View LazyDataVStack.swift
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 |
View InfoDictionary.swift
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 { |
View image-expansion.swift
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 { |
View TwoSidedView.swift
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
// | |
// TwoSidedView.swift | |
// FrameUpExample | |
// | |
// Created by Ryan Lintott on 2022-07-11. | |
// | |
import SwiftUI | |
struct TwoSidedView<UpContent: View, DownContent: View>: View { |
View ShirtThatFits.swift
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
// | |
// ShirtThatFits.swift | |
// ShirtThatFits | |
// | |
// Created by Ryan Lintott on 2022-08-05. | |
// | |
import SwiftUI | |
enum Shirt: Int, RawRepresentable, CaseIterable, Identifiable, Hashable, Codable, View { |
View FlippableView.swift
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 { |
View AVSpeechSynthesizer-IPASpeech-extension.swift
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 { |
OlderNewer