儲存 struct,通常為 View 的私有成員變數。
@State private var count = 0
extension NSBezierPath { | |
/// A `CGPath` object representing the current `NSBezierPath`. | |
var cgPath: CGPath { | |
let path = CGMutablePath() | |
let points = UnsafeMutablePointer<NSPoint>.allocate(capacity: 3) | |
if elementCount > 0 { | |
var didClosePath = true |
// | |
// Bookmark.swift | |
// | |
// | |
// Created by scchn on 2020/5/18. | |
// Copyright © 2020 scchn. All rights reserved. | |
// | |
import Foundation |
import AppKit | |
public extension NSBezierPath { | |
public convenience init(path: CGPath) { | |
self.init() | |
let pathPtr = UnsafeMutablePointer<NSBezierPath>.alloc(1) | |
pathPtr.initialize(self) | |
#!/bin/bash | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
echo "Killing VDCAssistant..." | |
sudo killall VDCAssistant | |
echo "Killing AppleCameraAssistant..." |