-4
unsigned char pixelData[4] = { 0, 0, 0, 0 };
CGContextRef context = CGBitmapContextCreate(pixelData,
1,
1,
bitsPerComponent,
bytesPerRow,
colorSpace,
kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
我想將unsigned char pixelData[4] = { 0, 0, 0, 0 };
翻譯爲Swift。看來我必須使用UnsafeMutableRawPointer
。但是我不知道怎麼做。將CGBitmapContextCreate從Objective-C翻譯成Swift
請參閱[__Apple Docs__](https://developer.apple.com/documentation/swift/unsafemutablerawpointer)以獲取更多信息,也許? – holex