The following code works fine in Swift2.2 of iOS7+, Swift3.0 of iOS8+, would crash only in Swift3.0 iOS7.
let context = CIContext(options: nil)
The console info:
-[CIContext initWithOptions:]: unrecognized selector sent to instance 0x147366e0 2016-10-25 17:32:27.903 CMBMobile DEV[1017:4403] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CIContext initWithOptions:]: unrecognized selector sent to instance 0x147366e0'
I tried to change it into
let context = CIContext()
But it seems the instance of context is not been initialize for the address of it is 0x00000000
.And when I call context.createCGImage(ciimage, from: originRect)
returns unexpected nil.