Posts

Post not yet marked as solved
0 Replies
286 Views
Hi,When Core Bluetooth reconnects to a bonded peripheral that has active notifications set, and the peripheral sends a notification immedately after successful reconnect, will Core Bluetooth correctly process that notification into its internal cache?Regards,ac
Posted
by skajam66.
Last updated
.
Post marked as solved
3 Replies
1.4k Views
I am unable to get an image that was originally created via a CIFilter to display in IB on on a simulator. Display on a device is fine.Here is how I am rendering the image: if let f = constructFilter(radius: radius, value: sliderView.value.hsba.brightness), let foi = f.outputImage { circleView.image = UIImage(ciImage: foi) }And here is how I consruct the filter (the 'value' input parameter is always 1.0): private func constructFilter(radius: CGFloat, value: CGFloat) -> CIFilter? { guard let cs = CGColorSpace.init(name: CGColorSpace.extendedSRGB) else { return nil } return CIFilter(name: "CIHueSaturationValueGradient", parameters: [ "inputColorSpace" : cs, "inputDither" : 0, "inputRadius" : radius, "inputSoftness" : 0, "inputValue" : value]) }The specific color space doesn't change the behaviour. This also fails: return CIFilter(name: "CIHueSaturationValueGradient", parameters: [ "inputColorSpace" : CGColorSpaceCreateDeviceRGB(), "inputDither" : 0, "inputRadius" : radius, "inputSoftness" : 0, "inputValue" : value])Of course, if I generate the image from a resource it works just fine on device, IB and simulator.Poking around in the debugger, I notice that extracting png data from the UIImage returns nil when the image has been created from CIFilter - which could explain why IB and simulator fail to display anythingAny thoughts would be welcome.Regards,ac
Posted
by skajam66.
Last updated
.