I have make a GLKView
subclass to display CIImage
for better performance displaying the output image for a chain of CIFilter
s.
However, it seem that I need to implement to contentMode
logic in order to have a correct inRect
for drawImage(image: CIImage, inRect: CGRect, fromRect: CGRect)
in drawRect(rect: CGRect)
call.
Anyone know how to implement such logic in order to align with the contentMode
behaviour of UIImageView`?
For making the contentMode to work in similar way as UIView. I have make the following class.
In the draw(_:CGRect).