I have the following code, in objective C.
[pixelData processPixelsWithBlock:^(JGPixel *pixel, int x, int y) {
}];
now, to me, the swift equivalent would be
pixelData.processPixelsWithBlock({(pixel: JGPixel, x: Int, y: Int) -> Void in
})
however, that is throwing an error of
Cannot convert value of type '(JGPixel, Int, Int) -> Void' to expected argument type '((UnsafeMutablePointer, Int32, Int32) -> Void)!'
Can anyone help explain where i'm going wrong, and how I can learn more about this error. Thanks!