Skip to content

Instantly share code, notes, and snippets.

View Snowy1803's full-sized avatar
🎯
Focusing

Emil Pedersen Snowy1803

🎯
Focusing
View GitHub Profile
@Snowy1803
Snowy1803 / ContentView.swift
Last active July 28, 2023 01:37
This code allows you to use matchedGeometryEffect in SwiftUI while keeping iOS 13 compatibility in your app.
//
// ContentView.swift
// Example of using matchedGeometryEffect in iOS 13 code
// matchedGeometryEffect example code taken and adapted from :
// https://sarunw.com/posts/a-first-look-at-matchedgeometryeffect/
//
// Created by Emil Pedersen on 16/10/2020.
//
struct ContentView: View {
@Snowy1803
Snowy1803 / NSRegularExpression+Swift.swift
Last active January 8, 2022 14:47
Utilities for using the NSRegularExpression from Objective-C naturally with Swift
//
// NSRegularExpression+Swift.swift
// Utilities for using the NSRegularExpression from Objective-C naturally with Swift, using Swift `Range` instead of Objective-C `NSRange`. A String in Swift is indexed differently than NSString, every conversion is handled correctly here.
//
// Created by Emil Pedersen on 01/07/2020.
// https://github.com/Snowy1803
//
// MIT LICENSE
//
// Copyright 2021 Emil Pedersen