         })
     }
     
-    func makeToastActivity() {
-        makeToastActivity(position: HRToastActivityPositionDefault as AnyObject)
-    }
-    
-    func makeToastActivity(message msg: String){
-        makeToastActivity(position: HRToastActivityPositionDefault as AnyObject, message: msg)
-    }
-    
-    fileprivate func makeToastActivity(position pos: AnyObject, message msg: String = "") {
+    func makeToastActivity(withConfiguration config: HRToastConfig = HRToastConfig()) {
+        makeToastActivity(position: config.HRToastActivityPositionDefault as AnyObject, withConfiguration: config)
+    }
+    
+    func makeToastActivity(message msg: String, withConfiguration config: HRToastConfig = HRToastConfig()){
+        makeToastActivity(position: config.HRToastActivityPositionDefault as AnyObject, message: msg, withConfiguration: config)
+    }
+    
+    fileprivate func makeToastActivity(position pos: AnyObject, message msg: String = "", withConfiguration config: HRToastConfig) {
         let existingActivityView: UIView? = objc_getAssociatedObject(self, &HRToastActivityView) as? UIView
         if existingActivityView != nil { return }
         
-        let activityView = UIView(frame: CGRect(x: 0, y: 0, width: HRToastActivityWidth, height: HRToastActivityHeight))
-        activityView.layer.cornerRadius = HRToastCornerRadius
-        
-        activityView.center = self.centerPointForPosition(pos, toast: activityView)
-        activityView.backgroundColor = UIView.hr_toastThemeColor().withAlphaComponent(HRToastOpacity)
+        let activityView = UIView(frame: CGRect(x: 0, y: 0, width: config.HRToastActivityWidth, height: config.HRToastActivityHeight))
+        activityView.layer.cornerRadius = config.HRToastCornerRadius
+        
+        activityView.center = self.centerPointForPosition(pos, toast: activityView, withConfiguration: config)
+        activityView.backgroundColor = UIView.hr_toastThemeColor().withAlphaComponent(config.HRToastOpacity)
         activityView.alpha = 0.0
         activityView.autoresizingMask = ([.flexibleLeftMargin, .flexibleTopMargin, .flexibleRightMargin, .flexibleBottomMargin])
         
-        if HRToastDisplayShadow {
+        if config.HRToastDisplayShadow {
             activityView.layer.shadowColor = UIView.hr_toastThemeColor().cgColor
-            activityView.layer.shadowOpacity = Float(HRToastShadowOpacity)
-            activityView.layer.shadowRadius = HRToastShadowRadius
-            activityView.layer.shadowOffset = HRToastShadowOffset
+            activityView.layer.shadowOpacity = Float(config.HRToastShadowOpacity)
+            activityView.layer.shadowRadius = config.HRToastShadowRadius
+            activityView.layer.shadowOffset = config.HRToastShadowOffset
         }
         
         let activityIndicatorView = UIActivityIndicatorView(activityIndicatorStyle: .whiteLarge)

    }
    
}

public extension String {
    
    func stringHeightWithFontSize(_ fontSize: CGFloat,width: CGFloat) -> CGFloat {
        let font = UIFont(name: UIView.hr_toastFontName(), size: HRToastFontSize)
        let size = CGSize(width: width, height: CGFloat.greatestFiniteMagnitude)
        let paragraphStyle = NSMutableParagraphStyle()
        paragraphStyle.lineBreakMode = .byWordWrapping
        let attributes = [NSFontAttributeName:font!,
                          NSParagraphStyleAttributeName:paragraphStyle.copy()]
        
        let text = self as NSString
        let rect = text.boundingRect(with: size, options:.usesLineFragmentOrigin, attributes: attributes, context:nil)
        return rect.size.height
    }
    
}


        if let msg = msg {
            let msgLabel = UILabel()
            msgLabel.translatesAutoresizingMaskIntoConstraints = false
            msgLabel.numberOfLines = config.HRToastMaxMessageLines
            msgLabel.font = UIFont(name: UIView.hr_toastFontName(), size: config.HRToastFontSize)
            msgLabel.lineBreakMode = .byWordWrapping
            msgLabel.textAlignment = .center
            msgLabel.textColor = UIView.hr_toastFontColor()
