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 Foundation | |
import SwiftUI | |
#if os(macOS) | |
import AppKit | |
public typealias CrossPlatformColor = NSColor | |
#else | |
import UIKit | |
public typealias CrossPlatformColor = UIColor | |
#endif |
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
enum UserInterfaceIdiom: Int { | |
case unspecified = -1 | |
case phone = 0 | |
case pad = 1 | |
case tv = 2 | |
case carPlay = 3 | |
case mac = 5 | |
case watch = 6 | |
static var current: UserInterfaceIdiom { |
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 | |
import WebKit | |
struct WebView: NSViewRepresentable { | |
typealias NSViewType = WKWebView | |
var html: String | |
func makeNSView(context: Context) -> WKWebView { | |
return WKWebView() |
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 | |
struct TestNextTextFieldFocus: View { | |
@State var inputsValues: [String] = (0..<30).map { i in | |
"test \(i) TextField axis is \(i % 2 == 0 ? ".vertical" : ".horizontal")" | |
} | |
@FocusState var focusedInput: Int? | |
var body: some View { |
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
// ==UserScript== | |
// @name Remove utm | |
// @version 0.2.3 | |
// @description Remove utm parameters and medium hash tracking code from url, 去除网页链接中恼人的跟踪参数 | |
// @updateURL https://gist.github.com/AndySuen/09c480b2f90818b4fe0334e804e1dcc2/raw/remove_utm.user.js | |
// @homepage https://gist.github.com/AndySuen/09c480b2f90818b4fe0334e804e1dcc2 | |
// @author Andysuen | |
// @match *://*/* | |
// @run-at document-idle | |
// @grant none |
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
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/13.2/ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/WatchOS.platform/DeviceSupport/6.1/ /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/DeviceSupport | |
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/DeviceSupport/13.2/ /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/DeviceSupport |