Skip to content

Instantly share code, notes, and snippets.

@samrayner
samrayner / Realm+CascadeDeleting.swift
Last active June 24, 2021 10:38 — forked from krodak/Realm+CascadeDeleting.swift
Cascading deletion for RealmSwift
import Foundation
import RealmSwift
import Realm
//Forked from: https://gist.github.com/krodak/b47ea81b3ae25ca2f10c27476bed450c
internal protocol CascadingDeletable: RealmSwift.Object {
static var propertiesToCascadeDelete: [String] { get }
}
@krodak
krodak / Realm+CascadeDeleting.swift
Last active April 27, 2023 19:16
Cascade deletion for RealmSwift
import RealmSwift
import Realm
protocol CascadeDeleting: class {
func delete<Entity>(_ list: List<Entity>, cascading: Bool)
func delete<Entity>(_ results: Results<Entity>, cascading: Bool)
func delete<Entity: Object>(_ entity: Entity, cascading: Bool)
}
@steipete
steipete / ios-xcode-device-support.sh
Last active December 12, 2023 03:36
Using iOS 15 devices with Xcode 12.5 (instead of Xcode 13)
# The trick is to link the DeviceSupport folder from the beta to the stable version.
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :)
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5:
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions
# (A similar approach works for older versions too, just change the version number after DeviceSupport)
@zacwest
zacwest / ios-font-sizes.swift
Last active June 17, 2024 01:38
iOS default font sizes - also available on https://www.iosfontsizes.com
let styles: [UIFont.TextStyle] = [
// iOS 17
.extraLargeTitle, .extraLargeTitle2,
// iOS 11
.largeTitle,
// iOS 9
.title1, .title2, .title3, .callout,
// iOS 7
.headline, .subheadline, .body, .footnote, .caption1, .caption2,
]
@orkoden
orkoden / tddberlin_iOS_notes.md
Last active May 18, 2021 08:43
Notes from TDD iOS Notes

TDD Workshop Notes

http://tdd-workshop.uikonf.com

Twitter hashtag #tddberlin

Mobile Central Europe Conference in Warsaw in Feb 2015

Resources

Reading