- [ユーザとアクセス]を開く
- [キー]画面を開く
- +ボタンよりキーを生成し、p8ファイルをダウンロードする
- Key Id(Headerに必要)とIssure Id(Payloadに必要)を取得する
extension NSProgressIndicator { | |
func set(tintColor: NSColor) { | |
guard let adjustedTintColor = tintColor.usingColorSpace(.deviceRGB) else { | |
contentFilters = [] | |
return | |
} | |
let tintColorRedComponent = adjustedTintColor.redComponent |
A collection of information about accessing raw MultiTouch events on MacOS.
Compiled while building mtif (a MultiTouch interface for common lisp).
#import <Foundation/Foundation.h> | |
#import <Cocoa/Cocoa.h> | |
int main(int argc, const char * argv[]) | |
{ | |
@autoreleasepool { | |
// Grab the current mouse location. | |
CGPoint mouseLoc = CGEventGetLocation(CGEventCreate(NULL)); |
let path = UIBezierPath() | |
// Apple | |
path.move(to: CGPoint(x: 110.89, y: 99.2)) | |
path.addCurve(to: CGPoint(x: 105.97, y: 108.09), controlPoint1: CGPoint(x: 109.5, y: 102.41), controlPoint2: CGPoint(x: 107.87, y: 105.37)) | |
path.addCurve(to: CGPoint(x: 99.64, y: 115.79), controlPoint1: CGPoint(x: 103.39, y: 111.8), controlPoint2: CGPoint(x: 101.27, y: 114.37)) | |
path.addCurve(to: CGPoint(x: 91.5, y: 119.4), controlPoint1: CGPoint(x: 97.11, y: 118.13), controlPoint2: CGPoint(x: 94.4, y: 119.33)) | |
path.addCurve(to: CGPoint(x: 83.99, y: 117.59), controlPoint1: CGPoint(x: 89.42, y: 119.4), controlPoint2: CGPoint(x: 86.91, y: 118.8)) | |
path.addCurve(to: CGPoint(x: 75.9, y: 115.79), controlPoint1: CGPoint(x: 81.06, y: 116.39), controlPoint2: CGPoint(x: 78.36, y: 115.79)) | |
path.addCurve(to: CGPoint(x: 67.58, y: 117.59), controlPoint1: CGPoint(x: 73.31, y: 115.79), controlPoint2: CGPoint(x: 70.54, y: 116.39)) |
func createGIF(with images: [UIImage], loopCount: Int = 0, frameDelay: Double, callback: (data: NSData?, error: NSError?) -> ()) { | |
let fileProperties = [kCGImagePropertyGIFDictionary as String: [kCGImagePropertyGIFLoopCount as String: loopCount]] | |
let frameProperties = [kCGImagePropertyGIFDictionary as String: [kCGImagePropertyGIFDelayTime as String: frameDelay]] | |
let documentsDirectory = NSTemporaryDirectory() | |
let url = NSURL(fileURLWithPath: documentsDirectory)?.URLByAppendingPathComponent("animated.gif") | |
if let url = url { | |
let destination = CGImageDestinationCreateWithURL(url, kUTTypeGIF, UInt(images.count), nil) | |
CGImageDestinationSetProperties(destination, fileProperties) |