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
// MIT License - © 2017 Jonathan Cole. | |
import Cocoa | |
/** | |
A view with the ability to hide itself if the user clicks outside of it. | |
*/ | |
class ModalView: NSView { | |
private var monitor: Any? | |
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
@-moz-document regexp("https:\\/\\/3.basecamp.com\\/.+#board") { | |
/* | |
* This is a CSS file that cleans up the look of Tracked for Basecamp on Dark Mode in Firefox (and probably other browsers). | |
* First, on Basecamp go to your settings and change the theme to dark mode or light mode - not auto. | |
* Auto doesn't set data-color-scheme, which Tracked uses to color its own components. | |
* Next, Install Stylus, then create a new style. Click "Import" in the top-left and paste this code in. | |
*/ | |
:root { |
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
apple#!/bin/bash | |
VERSION="1.3.1" | |
SDKVERSION_IPHONE="14.5" | |
ARCHS_DEVICES_IPHONE="arm64e armv7" | |
ARCHS_SIMULATOR_IPHONE="x86_64 arm64" | |
SDKVERSION_WATCH="7.4" | |
ARCHS_DEVICES_WATCH="arm64_32 armv7k" |
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
/** | |
Adapted from here: | |
https://www.vadimbulavin.com/how-to-move-swiftui-view-when-keyboard-covers-text-field/ | |
Use these publishers to know when the keyboard is about to hide or show. | |
As an example, you can use this to scroll a ScrollView automatically after | |
the keyboard shows, using the timing information provided here. | |
*/ | |
import Combine |
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 View { | |
/** | |
From here: https://www.youtube.com/watch?v=3a7tuhVpoTQ | |
More discussion here: https://stackoverflow.com/a/73590189 | |
This method synchronizes two bindings so that updates to one | |
result in updates to the other. | |
**Why do this?** | |
Have you ever gotten this error? `Publishing changes from within view updates is not allowed, this will cause undefined behavior.` |
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
// | |
// PinningToCorner.swift | |
// No license, go wild. | |
// | |
import SwiftUI | |
struct PinningToCorner<Content: View>: View { | |
enum Corner { | |
case topLeading |
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
/// Embeds its content between two horizontal dividers. | |
struct Davider<Content: View>: View { | |
let content: Content | |
init(@ViewBuilder content: () -> Content) { | |
self.content = content() | |
} | |
var body: some View { | |
HStack { |
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
.SFUI-Black | |
.SFUI-BlackItalic | |
.SFUI-Bold | |
.SFUI-BoldItalic | |
.SFUI-Heavy | |
.SFUI-HeavyItalic | |
.SFUI-Light | |
.SFUI-LightItalic | |
.SFUI-Medium | |
.SFUI-MediumItalic |
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
echo "Building for iOS..." | |
xcodebuild archive \ | |
-sdk iphoneos IPHONEOS_DEPLOYMENT_TARGET=9.0 \ | |
-arch armv7 -arch arm64 \ | |
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ | |
-scheme "ExampleLibrary" \ | |
-archivePath "./build/iphoneos/ExampleLibrary.xcarchive" SKIP_INSTALL=NO |
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
əˈkɔrdɪŋ tu ɔl noʊn lɔz | |
ʌv ˌeɪviˈeɪʃən, | |
ðɛr ɪz noʊ weɪ ə bi | |
ʃʊd bi ˈeɪbəl tu flaɪ. | |
ɪts wɪŋz ɑr tu smɔl tu gɛt | |
ɪts fæt ˈlɪtəl ˈbɑdi ɔf ðə graʊnd. |
NewerOlder