         }
         startAnimation()
     }
-    
+}
+
+// MARK: Appear and Disappear
+
+public extension RippleView {
     public func appearAtView(view: UIView, offset: CGPoint = CGPointZero) {
         appearInView(view.superview, point: view.center + offset)
     }

        get { return ringLayer.lineWidth }
        set { ringLayer.lineWidth = newValue }
    }
    
    public var ringScale: Float = 2 {
        didSet { restartAnimation() }
    }
    
    public var duration: NSTimeInterval = 1.5 {
        didSet { restartAnimation() }
    }
    
    public var coreImage: UIImage? {
        didSet { imageView.image = coreImage }
    }
    
    private var coreLayer = CAShapeLayer()
    
    private lazy var ringLayer: CAShapeLayer = {
        let layer = CAShapeLayer()
        layer.lineWidth = RippleView.defaultRingWidth
        layer.fillColor = UIColor.clearColor().CGColor
        return layer
    }()
    
    public lazy var imageView: UIImageView = {
        let imageView = UIImageView(frame: self.bounds)
        imageView.contentMode = .Center
        return imageView
    }()
    
    public override func layoutSubviews() {
        super.layoutSubviews()
        coreLayer.frame = bounds
        coreLayer.path = UIBezierPath(ovalInRect: bounds).CGPath
        ringLayer.frame = bounds
        ringLayer.path = UIBezierPath(ovalInRect: bounds).CGPath
        imageView.frame = bounds
    }
    
    public func startAnimation() {
        ringLayer.removeAllAnimations()
        

    static let defaultSize = CGSizeMake(24, 24)
    static let defaultRingWidth = CGFloat(3)
    
    public var delegate: RippleViewDelegate?
    public var size: CGSize = RippleView.defaultSize
    
    private var coreLayer = CAShapeLayer()
    
    public var ringScale: Float = 2 {
        didSet { restartAnimation() }
    }
    
    public var duration: NSTimeInterval = 1.5 {
        didSet { restartAnimation() }
    }
    
    public var coreImage: UIImage? {
        didSet { imageView.image = coreImage }
    }
    
    init() {
        super.init(frame: CGRectZero)
