- https://github.com/LucasMucGH/BottomSheet (works; examples work and provide a reasonable multi-height bottom drawer for swiftui, although in detail it's different from the Apple Maps one)
- https://github.com/faberNovel/DynamicOverlay (works; provides a SwiftUI example that copies the gestures of the Apple Maps app more closely, actual implementation is UIKit)
- https://swiftwithmajid.com/2019/12/11/building-bottom-sheet-in-swiftui/ (only the first step of building a drawer)
- https://github.com/weitieda/bottom-sheet (Only single height)
- https://github.com/maustinstar/swiftui-drawer (Examples don't work out of the box)
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
import CoreHaptics | |
import SwiftUI | |
enum FeedbackType { | |
case selection, success, error | |
} | |
class Haptics { | |
@AppStorage("HaptikFeedbackEnabled") var haptikFeedbackEnabled = true |
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
import SwiftUI | |
class DemoModel : ObservableObject { | |
enum State { | |
case value(Date) | |
} | |
@Published var counter = 0 | |
@Published var state = State.value(Date()) |
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
#!/usr/bin/env ruby | |
# Create and open a file from the shell using simple templates | |
# https://gist.github.com/ralfebert/cdc30dbc9d2c2356d8f9b6b7c1492888/edit | |
require 'date' | |
require 'shellwords' | |
require 'ostruct' | |
require 'optionparser' |
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
func arrayWith(count: Int, sum : Int) -> [Int] { | |
assert(count >= 1) | |
var result = [sum] | |
while result.count < count { | |
let randomIndex = result.indices.randomElement()! | |
let v = Int.random(in: 0...result[randomIndex]) | |
result[randomIndex] -= v | |
result.append(v) | |
} | |
return result |
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
#!/usr/bin/env python | |
import os | |
import sys | |
import subprocess | |
import shutil | |
import json | |
import re | |
import time | |
from distutils.spawn import find_executable |
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
import CoreGraphics | |
import CoreImage | |
func imageMetadataString(image: CGImage) -> String { | |
return "\(image.width)x\(image.height) bitsPerComponent:\(image.bitsPerComponent) bytesPerRow:\(image.bytesPerRow) bitsPerPixel:\(image.bitsPerPixel)" | |
} | |
/** | |
@brief Returns the maximum difference of pixel values in the image. | |
@discussion Assumes doImagesHaveSameMeta has already returned true on |
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
#!/usr/bin/env ruby | |
require 'nokogiri' | |
def show_usage(msg = nil) | |
puts "#{msg}\n\n" if msg | |
puts "Usage:\n\t#{$PROGRAM_NAME} [storyboard_file]" | |
exit(0) | |
end |
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
#!/usr/bin/env ruby | |
require 'fileutils' | |
require 'xcodeproj' | |
unless ARGV.count == 2 | |
puts "Usage: xcode_set_development_region.rb [project] [region]" | |
exit(1) | |
end |
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
From 5366b677f1f7a1053de5904f96ba5108ffaf8953 Mon Sep 17 00:00:00 2001 | |
From: Ralf Ebert <[email protected]> | |
Date: Thu, 7 May 2015 23:33:01 +0200 | |
Subject: [PATCH] Fix for #844: Incompatibility haml (4.0.6) -> sprockets | |
(3.0.3) causing error 'wrong number of arguments' for inline :sass filter in | |
haml template | |
--- | |
lib/haml/sass_rails_filter.rb | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) |