Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
// Implementation of the view using AppKit. | |
#if os(macOS) | |
import AppKit | |
import SwiftUI | |
final class AppKitTextView: NSView { | |
let textView: NSTextView = { | |
let this = NSTextView() | |
this.translatesAutoresizingMaskIntoConstraints = false | |
return this |
I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.
Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?
extension UIHostingController { | |
convenience public init(rootView: Content, ignoreSafeArea: Bool) { | |
self.init(rootView: rootView) | |
if ignoreSafeArea { | |
disableSafeArea() | |
} | |
} | |
func disableSafeArea() { |
import UIKit | |
extension NSNotification.Name { | |
static let didResignKey = Self.init("UISBHSMainHostWindowDidResignKeyNotification") | |
static let didBecomeKey = Self.init("UISBHSMainHostWindowDidBecomeKeyNotification") | |
} | |
extension Notification { |
#!/bin/sh | |
basename=`basename $0` | |
if [ -z "$*" ]; then | |
echo "usage: ${basename} <dot> [ -o | -r | <file> | - ]" | |
echo "" | |
echo "options:" | |
echo " -o open dot in window with keyboard focus" | |
echo " -r read contents of dot" |
<key>NSAppleScriptEnabled</key> | |
<true/> | |
<key>OSAScriptingDefinition</key> | |
<string>ScriptableTasks.sdef</string> |