         blocker.backgroundColor = Statics.backgroundColor
         blocker.tag = Statics.containerViewTag
         
+        blocker.setTranslatesAutoresizingMaskIntoConstraints(false)
+
         window.addSubview(blocker)
         
+        let viewsDictionary = ["blocker": blocker]
+        
+        // Add constraints to handle orientation change
+        let constraintsV = NSLayoutConstraint.constraintsWithVisualFormat("V:|-0-[blocker]-0-|",
+            options: NSLayoutFormatOptions(rawValue: 0),
+            metrics: nil,
+            views: viewsDictionary)
+        
+        let constraintsH = NSLayoutConstraint.constraintsWithVisualFormat("|-0-[blocker]-0-|",
+            options: NSLayoutFormatOptions(rawValue: 0),
+            metrics: nil,
+            views: viewsDictionary)
+        
+        window.addConstraints(constraintsV + constraintsH)
+        
         return blocker
     }
 }
        
        parentView.addSubview(containerView)
        
        return containerView
    }
    

            actualSize.height)
        
        let containerView = UIView(frame: containerViewRect)
     
        containerView.tag = Statics.containerViewTag
        containerView.layer.cornerRadius = Statics.cornerRadius
        containerView.backgroundColor = Statics.backgroundColor
