CRMotionView icon indicating copy to clipboard operation
CRMotionView copied to clipboard

API Docs for Swift

Open aaronraimist opened this issue 10 years ago • 1 comments

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?

aaronraimist avatar Jun 04 '14 20:06 aaronraimist

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.

pballart avatar Jan 15 '16 20:01 pballart