Skip to content

Instantly share code, notes, and snippets.

View nicodioso's full-sized avatar

Nico Dioso nicodioso

  • Philippines
View GitHub Profile
@ggrell
ggrell / ContentView.swift
Created February 12, 2021 22:16 — forked from Snowy1803/ContentView.swift
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 / 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 {
@anthonyvitocuaderno
anthonyvitocuaderno / EventBus.swift
Last active June 26, 2018 09:14
Prototype lightweight event bus for iOS swift 3.3
//
// EventBus.swift
// R2S
//
// Created by Vito Cuaderno on 6/1/18.
// Copyright © 2018 Total Integrated Resources. All rights reserved.
//
import Foundation
final class EventBus {
@dionc
dionc / MapKitExtensions.swift
Last active January 27, 2024 00:54
Create an MKCoordinateRegion from an array of coordinates. Safely handles coordinates that cross the 180th meridian.
import MapKit
extension MKCoordinateRegion {
init?(coordinates: [CLLocationCoordinate2D]) {
// first create a region centered around the prime meridian
let primeRegion = MKCoordinateRegion.region(for: coordinates, transform: { $0 }, inverseTransform: { $0 })
// next create a region centered around the 180th meridian