Read the blog at http://fokkezb.nl/2013/09/20/url-schemes-for-ios-and-android-2/
Array | |
( | |
[hook_menu] => 6744 | |
[hook_uninstall] => 4742 | |
[hook_perm(ission)] => 4012 | |
[hook_install] => 3751 | |
[hook_theme] => 3525 | |
[hook_schema] => 3003 | |
[hook_help] => 2465 | |
[hook_form_alter] => 2273 |
// Since the WKWebView has no sizeToFit() method, increase the frame height of the webView to | |
// match the height of the content's scrollHeight | |
// | |
// The WKWebView's `navigationDelegate` property needs to be set for the delegate method to be called | |
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { | |
if webView.isLoading == false { | |
webView.evaluateJavaScript("document.body.scrollHeight", completionHandler: { [weak self] (result, error) in | |
if let height = result as? CGFloat { |
#!/usr/bin/swift | |
import Foundation | |
// MARK: - Script variables | |
let awsProfileName: String? = "myProfile" | |
let serviceName = "someService" | |
// MARK: - Functions | |
@discardableResult | |
func shell(_ args: String..., returnStdOut: Bool = false, stdIn: Pipe? = nil) -> (Int32, Pipe) { |
import SwiftUI | |
struct ContentView: View { | |
@State private var selection = 1 //selected page | |
let dataModel = ["Forums", "Learn", "Careers", "Store", "About"] | |
var body: some View { | |
NavigationView { | |
VStack { | |
//ScrollableTabView | |
ScrollView(.horizontal, showsIndicators: false, content: { |
// | |
// DetentSheet.swift | |
// StarLardKit | |
// | |
// Created by Caleb Friden on 9/28/21. | |
// | |
import SwiftUI | |
// MARK: - Public |
Currently it doesn't seem possible to execute additional logic when a navigation link is tapped with the new NavigationLink(value:)
initializer. When the link is tapped it updates path state all the way back at the root NavigationStack
to drive navigation, but there are many times where we need to perform logic after the tap and before the drill down.
For example, after tapping a link we may want to pre-emptively load some data to show on the drill down screen. Or we may want to perform some form validation. Or we may want to track some analytics. This does not seem possible with the current link API.
A workaround is to use Button
s instead of NavigationLink
s, but then you lose all of the styling and affordances given to links, such as chevrons when used in List
.
If the API for NavigationLink
cannot be changed to accomodate for this, perhaps a new ButtonStyle
could be introduced that allows regular buttons to take on the sty
Sometimes you want to keep folders in sync across different computers with some kind of file versioning, maybe you also want some kind of backup. You could use a private repository on GitHub, Bitbucket or Gitlab for that. However, when that data is particularly private, you might want to encrypt your data. git-remote-gcrypt
can do that for you. As other guides on that topic were not very specific about syncing between two different computers, this guide focuses on that.
These are the sources I used:
- https://manpages.debian.org/testing/git-remote-gcrypt/git-remote-gcrypt.1.en.html seem to be the official manpages.
- https://caolan.uk/notes/2017-04-27_encrypted_git_repositories.cm
- https://git-annex.branchable.com/tips/fully_encrypted_git_repositories_with_gcrypt/
- https://www.alwaysrightinstitute.com/gcrypt/
- and I used this gist to answer a question here https://superuser.com/a/1750771/1744178