Skip to content

Instantly share code, notes, and snippets.

import Foundation
import SwiftUI
extension ScrollView {
/// Workaround for large titles flickering on collapse. Not applied for iOS 15+.
/// Based on https://stackoverflow.com/a/67270977/99714 but avoids a questionable API by using a concrete type.
func largeTitleFlickerWorkaround() -> some View {
Group {
if #available(iOS 15.0, *) {
@alextrob
alextrob / AppDelegate.swift
Last active February 16, 2017 03:06
Swift: Memory leak when storing enum in class
//
// AppDelegate.swift
// LeakCheck
//
// Created by Alex Robinson on 15/2/17.
// Copyright © 2017 Alex Robinson. All rights reserved.
//
import UIKit
@alextrob
alextrob / SmoothAnchors_usage.html
Created February 2, 2012 10:50
SmoothAnchors usage
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="SmoothAnchors.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$().SmoothAnchors();
});
</script>