CRMotionView
CRMotionView copied to clipboard
API Docs for Swift
I am trying to do this:
var motionView: CRMotionView = CRMotionView(frame: self.view.bounds)
motionView.setImage(image)
motionView.setMotionEnabled(true)
but it says 'CRMotionView' does not have a member named 'setImage'
. What is the correct way to use this in Swift?
Hi,
After pod install
you need to include the bridging header #import "CRMotionView/CRMotionView.h"
Then in your view controller import CRMotionView
.
Finally, you can use the initializer CRMotionView(frame: self.view.bounds, image: image)
or motionView.image = image
.