     func commonInit(){
         self.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0)
         self.tag = 1313
+        self.layer.zPosition = 9999
     }
     
     
     func setupToasterView(toaster: QToasterSwift){
         self.toaster = toaster
         
-        var textAreaWidth =  self.width - 20
+        var textAreaWidth =  QToasterConfig.screenWidth - 20
         var imageToasterHeight:CGFloat = 0
         var textXPos:CGFloat = 10
         
         if toaster.iconImage != nil || (toaster.iconURL != nil && toaster.iconURL != ""){
-            imageToasterHeight = toaster.iconSquareSize + self.statusBarHeight + 20
+            imageToasterHeight = toaster.iconSquareSize + QToasterConfig.statusBarHeight + 20
             textAreaWidth -= (toaster.iconSquareSize + 5)
             toaster.textAlignment = NSTextAlignment.Left
             textXPos += toaster.iconSquareSize + 5
         }
         
-        var toasterHeight = self.textSize.height + self.titleSize.height + self.statusBarHeight + 20
+        var toasterHeight = self.textSize.height + self.titleSize.height + QToasterConfig.statusBarHeight + 20
         if self.titleSize.height > 0 {
             toasterHeight += 3
         }

    var viewArea = UIView()
    
    var minHeight:CGFloat{
        return self.statusBarHeight + 40
    }
    var textSize:CGSize{
        if toaster.iconImage == nil && (toaster.iconURL == nil || toaster.iconURL == "") {
            return textSize(toaster.text, font: toaster.textFont, maxWidth: self.width - 20)
        }else{
            return textSize(toaster.text, font: toaster.textFont, maxWidth: self.width - toaster.iconSquareSize - 25)
        }
    }
    var titleSize:CGSize{
        if toaster.titleText != nil && toaster.titleText != ""{
            if toaster.iconImage == nil && (toaster.iconURL == nil || toaster.iconURL == "") {
                return textSize(toaster.titleText!, font: toaster.textFont, maxWidth: self.width - 20)
            }else{
                return textSize(toaster.titleText!, font: toaster.textFont, maxWidth: self.width -  toaster.iconSquareSize - 25)
            }
        }else{
            return CGSizeMake(0, 0)
        }
    }
    
    var width:CGFloat{
        get{
            return UIScreen.mainScreen().bounds.size.width
        }
    }
    
    var statusBarHeight:CGFloat{
        get{
            return UIApplication.sharedApplication().statusBarFrame.size.height
        }
    }
    

        textLabel.font = toaster.textFont
        viewArea.addSubview(textLabel)
        
        self.frame = CGRectMake(0, 0, QToasterConfig.screenWidth, toasterHeight)
        self.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0)
        self.addTarget(self, action: #selector(self.toaster.touchAction), forControlEvents: UIControlEvents.TouchUpInside)
        self.addSubview(viewArea)
    }
    
    
    func show(){
        UIView.animateWithDuration(self.toaster.animateDuration, delay: 0, options: UIViewAnimationOptions.AllowUserInteraction, animations: {
            let showFrame = CGRectMake(0,0,QToasterConfig.screenWidth,self.frame.height)
            self.viewArea.frame = showFrame
            }, completion: { _ in
                self.hide()
            }
        )
        
    }
    func hide(completion: () -> Void = ({})){
        UIView.animateWithDuration(self.toaster.animateDuration, delay: self.toaster.delayDuration, options: UIViewAnimationOptions.AllowUserInteraction,
            animations: {
                let hideFrame = CGRectMake(0,0 - self.frame.height,QToasterConfig.screenWidth,self.frame.height)
                self.frame = hideFrame
            },
            completion: { _ in
                self.removeFromSuperview()
                completion()
            }
        )
    }
}
