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 AccessibilitySnapshot | |
import SnapshotTesting | |
import SwiftUI | |
import XCTest | |
extension Snapshotting where Value == UIViewController, Format == UIImage { | |
fileprivate static func standardImage( | |
on viewImageConfig: ViewImageConfig, | |
perceptualPrecision: Float = 0.98, | |
precision: Float = 0.995 |
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
// | |
// ContentView.swift | |
// Airdrop Demo | |
// | |
// Created by Daniel Kuntz on 7/30/23. | |
// | |
import SwiftUI | |
struct ContentView: View { |
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 AVFoundation | |
actor AudioRecorder { | |
private let audioEngine = AVAudioEngine() | |
#if os(iOS) | |
private let audioSession = AVAudioSession.sharedInstance() | |
#endif | |
static func authorize() async -> Bool { | |
await withCheckedContinuation { continuation in |
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
extension LoginViewController: WKNavigationDelegate { | |
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { | |
if let url = webView.url, url.absoluteString.contains("/index.action") { | |
let store = WKWebsiteDataStore.default().httpCookieStore | |
store.getAllCookies { cookies in | |
if let sessionIdCookie = cookies.first(where: { cookie in | |
cookie.name == "JSESSIONID" | |
}) { | |
HTTPCookieStorage.shared.setCookies(cookies, for: webView.url, mainDocumentURL: nil) | |
self.callback(ConfluenceSessionCookie(jSessonId: sessionIdCookie)) |
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
extension UIHostingController { | |
convenience public init(rootView: Content, ignoreSafeArea: Bool) { | |
self.init(rootView: rootView) | |
if ignoreSafeArea { | |
disableSafeArea() | |
} | |
} | |
func disableSafeArea() { |
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
@main | |
struct MyApp: App { | |
enum Sheet { case first, second } | |
@State var sheet: Sheet? = nil | |
var body: some Scene { | |
WindowGroup { | |
VStack { | |
Button("First") { sheet = .first } |
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 ChaoticPhoto: View { | |
let image: Image | |
let radius: CGFloat | |
@Binding var activated: Bool | |
@State var scale: CGFloat = 1 | |
var body: some View { | |
image | |
.resizable() |
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
Hello, | |
I'd like to request the following information, in accordance with the information rights in the GDPR, and particularly Article 15. Please address all points in this email in turn. | |
1. A copy of all my personal data held and/or undergoing processing, in a commonly used electronic form (Article 15(3)). Please note that this might also include any audiovisual material (e.g. voice-recordings or pictures) and is not necessarily limited to the information contained in your customer database and/or the information you make available through the ‘manage my profile’ functionality. For all data that would fall under Article 20 (portability), I would like to recieve this in a commonly-used machine readable format. For data that does not fall under Article 20, such as data inferred about me or opinions about me, I would like this in a commonly-used electronic format. | |
2. If any data was not collected, observed or inferred from me directly, precise information about the source of that data, including the name and c |
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
// | |
// CAMediaTimingFunction.swift | |
import UIKit | |
extension CAMediaTimingFunction { | |
static let linear = CAMediaTimingFunction(name: .linear) | |
static let easeOut = CAMediaTimingFunction(name: .easeOut) |
NewerOlder