In trying to create a CIAffineTransform
filter on MacOS X you are supposed to encode an NSAffineTransform
using Objective-C code like:
[NSValue valueWithBytes:&xform
objCType:@encode(NSAffineTransform)];
But in Swift the Objective-C @encode
directive does not exist in Swift.
How do you encode an NSAffineTransform
into an NSValue
in Swift so that it will be acceptable to Core Image?