             self.font = font!
         }
         
-        self.attachedFrame = frame
-        self.title = title
+        self.text = text
         self.arrowPosition = arrowPosition
         self.backgroundColor = UIColor.clear
         
-        self.frame = calculateFrame(with: self.font)
+        self.attachedFrame = frame
+        self.frame = bubbleViewFrame
         fixFrameIfOutOfBounds()
         
         // Make it pass touch events through to the CoachMarksView
         isUserInteractionEnabled = false
         
         // Calculate and position text
-        let actualXPosition = self.offsets.width + CGFloat((PADDING * 1.5))
-        let actualYPosition = self.offsets.height + CGFloat((PADDING * 1.25))
-        let actualWidth = self.frame.size.width - actualXPosition - CGFloat((PADDING * 1.5))
-        let actualHeight = self.frame.size.height - actualYPosition - CGFloat((PADDING * 1.2))
+        let actualXPosition = self.offsets.width + textPadding * 1.5
+        let actualYPosition = self.offsets.height + textPadding * 1.25
+        let actualWidth = self.frame.size.width - actualXPosition - textPadding * 1.5
+        let actualHeight = self.frame.size.height - actualYPosition - textPadding * 1.2
         
         let label = UILabel(frame: CGRect(x: actualXPosition, y: actualYPosition, width: actualWidth, height: actualHeight))
         label.font = self.font
         label.textColor = UIColor.black
         label.alpha = 0.9
-        label.text = title
+        label.text = text
         label.backgroundColor = UIColor.clear
         label.lineBreakMode = .byWordWrapping
         label.numberOfLines = 0

import Foundation
import UIKit

let ARROW_SIZE = 6
let ARROW_SPACE = 6
let PADDING = 8.0
let RADIUS = 6.0

class BubbleView: UIView {
    enum ArrowPosition {
        case top
        case bottom

        path.stroke()
        ctx.restoreGState()
    }
        
    /// Start bounce animation
    func animate() {
        UIView.animate(withDuration: 2.0, delay: 0.3, options: [.repeat, .autoreverse], animations: {
            self.transform = CGAffineTransform(translationX: 0, y: -5)
        }, completion: nil)
    }
    
    /// Check if bubble is going off the screen using the position and size. If it is, return true
    func fixFrameIfOutOfBounds() {
        guard let window = UIApplication.shared.keyWindow?.frame else {
            print("Couldn't get app window")
