Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extension UIView {
- func appearFromBelow(parent: UIView, below: Bool = true) {
- let wrapper = UIView(frame: frame)
- wrapper.clipsToBounds = true
- wrapper.addSubview(self)
- wrapper.backgroundColor = UIColor.blueColor()
- frame = wrapper.bounds
- parent.addSubview(wrapper)
- }
- func animateIn(duration: Double) {
- UIView.animateWithDuration(duration) {
- self.transform = CGAffineTransformIdentity
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement