Skip to content

Instantly share code, notes, and snippets.

View kaishin's full-sized avatar

Reda Lemeden kaishin

View GitHub Profile
@kaishin
kaishin / NSColor+isLight.h
Last active October 14, 2022 01:09
Programmatically determine the perceived lightness of a color. More details on: http://robots.thoughtbot.com/closer-look-color-lightness + Online tool: http://thoughtbot.github.io/color-lightness-test/
#import <Cocoa/Cocoa.h>
@interface NSColor (isLight)
- (BOOL)isLight;
@end
@kaishin
kaishin / Example.swift
Last active March 18, 2023 12:14
StickySheet – A sticky sheet implementation for SwiftUI
enum PresentedSheet: String, Identifiable {
case sticky, standard
var id: String {
return self.rawValue
}
}
extension String: Identifiable {
public var id: String {