MengTo / Spring

A library to simplify iOS animations in Swift.
http://designcode.io
MIT License
14.08k stars 1.8k forks source link

UIView to SpringView #237

Open ghost opened 7 years ago

ghost commented 7 years ago

if I have an UIView how can i transfer that to SpringView this is my attempt UIView as! SpringView

ghost commented 7 years ago

a

leavenstee commented 7 years ago

you can just use as SpringView instead of UIView and it will inherent the UIView Class attributes

leavenstee commented 7 years ago

let profile = SpringView(frame: CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height))

ghost commented 7 years ago

Bonjour

ghost commented 7 years ago

bonjour @Bunthaideng. Does anybody know why we are not able to use "as! SpringView"

ghost commented 7 years ago

It should just work because it is a subclass of UIView