 
     public func resize(newSize: CGSize, tintColor: UIColor? = nil, completionHandler: (resizedImage: UIImage) -> Void) {
         dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0)) {
-            UIGraphicsBeginImageContextWithOptions(newSize, false, 0);
+            UIGraphicsBeginImageContextWithOptions(newSize, false, 0)
             self.drawInRect(CGRectMake(0, 0, newSize.width, newSize.height))
             let newImage = UIGraphicsGetImageFromCurrentImageContext()
             UIGraphicsEndImageContext()

            return true
        }

        if let viewControllers = self.navigationController?.viewControllers {
            if viewControllers.contains(self) {
                return false
            }
        }

        return false
    }

    public var isModal: Bool {
        if self.presentingViewController != nil {
            return true
        }

        if self.presentingViewController?.presentedViewController == self {
            return true
        }

        if self.navigationController?.presentingViewController?.presentedViewController == self.navigationController {
            return true
        }

        if (self.tabBarController?.presentingViewController?.isKindOfClass(UITabBarController)) != nil {
            return true
        }


    }

    public var alpha: CGFloat {
        get { return CGColorGetAlpha(CGColor) }
        set { colorWithAlphaComponent(newValue) }
    }

    public func alpha(value: CGFloat) -> UIColor {
        return colorWithAlphaComponent(value)
    }

    // Credit: http://stackoverflow.com/a/31466450
