From 834c60da4592dbbe3db0b76b85a38058869a5864 Mon Sep 17 00:00:00 2001
From: JasonChengzi <3923240@qq.com>
Date: Fri, 15 Jul 2016 17:07:03 +0800
Subject: [PATCH] Swift version

---
 MJAlertView-Swift/CGFloatExtension.swift      |  41 +++
 MJAlertView-Swift/NumberExtension.swift       | 125 +++++++
 MJAlertView-Swift/StringExtension.swift       | 145 ++++++++
 .../UIColorExtension-Instance.swift           | 135 +++++++
 .../UIViewExtension-MJAlertView.swift         | 337 +++++++++++++++++
 .../MJAlertView-Swift/CGFloatExtension.swift  |  41 +++
 .../MJAlertView-Swift/NumberExtension.swift   | 125 +++++++
 .../MJAlertView-Swift/StringExtension.swift   | 145 ++++++++
 .../UIColorExtension-Instance.swift           | 135 +++++++
 .../UIViewExtension-MJAlertView.swift         | 337 +++++++++++++++++
 .../project.pbxproj                           | 321 +++++++++++++++++
 .../contents.xcworkspacedata                  |   7 +
 .../UserInterfaceState.xcuserstate            | Bin 0 -> 17330 bytes
 .../xcschemes/MJAlertViewDemo-Swift.xcscheme  |  91 +++++
 .../xcschemes/xcschememanagement.plist        |  22 ++
 .../MJAlertViewDemo-Swift/AppDelegate.swift   |  46 +++
 .../AppIcon.appiconset/Contents.json          |  38 ++
 .../Base.lproj/LaunchScreen.storyboard        |  27 ++
 .../Base.lproj/Main.storyboard                |  66 ++++
 .../MJAlertViewDemo-Swift/Info.plist          |  40 +++
 .../MJAlertView-Swift/CGFloatExtension.swift  |  43 +++
 .../MJAlertView-Swift/NumberExtension.swift   | 125 +++++++
 .../MJAlertView-Swift/StringExtension.swift   | 131 +++++++
 .../UIColorExtension-Instance.swift           | 135 +++++++
 .../UIViewExtension-MJAlertView.swift         | 339 ++++++++++++++++++
 .../ViewController.swift                      |  40 +++
 .../UserInterfaceState.xcuserstate            | Bin 0 -> 9273 bytes
 .../xcschemes/MJAlertViewDemo.xcscheme        | 101 ++++++
 .../xcschemes/xcschememanagement.plist        |  27 ++
 .../Base.lproj/Main.storyboard                |   5 +-
 30 files changed, 3168 insertions(+), 2 deletions(-)
 create mode 100644 MJAlertView-Swift/CGFloatExtension.swift
 create mode 100644 MJAlertView-Swift/NumberExtension.swift
 create mode 100644 MJAlertView-Swift/StringExtension.swift
 create mode 100644 MJAlertView-Swift/UIColorExtension-Instance.swift
 create mode 100644 MJAlertView-Swift/UIViewExtension-MJAlertView.swift
 create mode 100644 MJAlertViewDemo-Swift/MJAlertView-Swift/CGFloatExtension.swift
 create mode 100644 MJAlertViewDemo-Swift/MJAlertView-Swift/NumberExtension.swift
 create mode 100644 MJAlertViewDemo-Swift/MJAlertView-Swift/StringExtension.swift
 create mode 100644 MJAlertViewDemo-Swift/MJAlertView-Swift/UIColorExtension-Instance.swift
 create mode 100644 MJAlertViewDemo-Swift/MJAlertView-Swift/UIViewExtension-MJAlertView.swift
 create mode 100644 MJAlertViewDemo-Swift/MJAlertViewDemo-Swift.xcodeproj/project.pbxproj
 create mode 100644 MJAlertViewDemo-Swift/MJAlertViewDemo-Swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata
 create mode 100644 MJAlertViewDemo-Swift/MJAlertViewDemo-Swift.xcodeproj/project.xcworkspace/xcuserdata/JasonLee.xcuserdatad/UserInterfaceState.xcuserstate
 create mode 100644 MJAlertViewDemo-Swift/MJAlertViewDemo-Swift.xcodeproj/xcuserdata/JasonLee.xcuserdatad/xcschemes/MJAlertViewDemo-Swift.xcscheme
 create mode 100644 MJAlertViewDemo-Swift/MJAlertViewDemo-Swift.xcodeproj/xcuserdata/JasonLee.xcuserdatad/xcschemes/xcschememanagement.plist
 create mode 100644 MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/AppDelegate.swift
 create mode 100644 MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/Assets.xcassets/AppIcon.appiconset/Contents.json
 create mode 100644 MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/Base.lproj/LaunchScreen.storyboard
 create mode 100644 MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/Base.lproj/Main.storyboard
 create mode 100644 MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/Info.plist
 create mode 100644 MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/CGFloatExtension.swift
 create mode 100644 MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/NumberExtension.swift
 create mode 100644 MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/StringExtension.swift
 create mode 100644 MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/UIColorExtension-Instance.swift
 create mode 100644 MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/UIViewExtension-MJAlertView.swift
 create mode 100644 MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/ViewController.swift
 create mode 100644 MJAlertViewDemo/MJAlertViewDemo.xcodeproj/project.xcworkspace/xcuserdata/JasonLee.xcuserdatad/UserInterfaceState.xcuserstate
 create mode 100644 MJAlertViewDemo/MJAlertViewDemo.xcodeproj/xcuserdata/JasonLee.xcuserdatad/xcschemes/MJAlertViewDemo.xcscheme
 create mode 100644 MJAlertViewDemo/MJAlertViewDemo.xcodeproj/xcuserdata/JasonLee.xcuserdatad/xcschemes/xcschememanagement.plist

diff --git a/MJAlertView-Swift/CGFloatExtension.swift b/MJAlertView-Swift/CGFloatExtension.swift
new file mode 100644
index 0000000..d89a4ed
--- /dev/null
+++ b/MJAlertView-Swift/CGFloatExtension.swift
@@ -0,0 +1,41 @@
+//
+//  CGFloatExtension.swift
+//  ChildrenGuardian
+//
+//  Created by Jason.Chengzi on 16/06/17.
+//  Copyright © 2016年 Hvit. All rights reserved.
+//
+
+extension CGFloat {
+    ///转换为Float
+    var toFloat     : Float     { return Float(self)            }
+    ///转换为Int
+    var toInt       : Int       { return Int(self)              }
+    ///转换为Double
+    var toDouble    : Double    { return Double(self)           }
+    
+    ///一半数值
+    var half        : CGFloat   { return self / 2               }
+    ///相反数值
+    var opposite    : CGFloat   { return -self                  }
+    ///绝对值
+    var absolute    : CGFloat   { return abs(self)              }
+    ///两倍数值
+    var double      : CGFloat   { return self * 2               }
+    ///三倍数值
+    var triple      : CGFloat   { return self * 3               }
+    ///平方数
+    var square      : CGFloat   { return (self * self)          }
+    ///立方数
+    var cube        : CGFloat   { return (self * self * self)   }
+    
+    static func MIN(lbs lbs : CGFloat, rbs : CGFloat) -> CGFloat {
+        if lbs > rbs {
+            return rbs
+        } else if lbs < rbs {
+            return lbs
+        } else {
+            return lbs
+        }
+    }
+}
\ No newline at end of file
diff --git a/MJAlertView-Swift/NumberExtension.swift b/MJAlertView-Swift/NumberExtension.swift
new file mode 100644
index 0000000..9a8078b
--- /dev/null
+++ b/MJAlertView-Swift/NumberExtension.swift
@@ -0,0 +1,125 @@
+//
+//  NumberExtension.swift
+//  HealthPlus
+//
+//  Created by Jason.Chengzi on 16/05/20.
+//  Copyright © 2016年 Hvit. All rights reserved.
+//
+import UIKit
+
+extension Int {
+    ///转换为CGFloat
+    var toCGFloat   : CGFloat   { return CGFloat(self)          }
+    ///转换为Float
+    var toFloat     : Float     { return Float(self)            }
+    ///转换为Double
+    var toDouble    : Double    { return Double(self)           }
+    
+    ///一半数值
+    var half        : Int       { return self / 2               }
+    ///相反数值
+    var opposite    : Int       { return -self                  }
+    ///绝对值
+    var absolute    : Int       { return abs(self)              }
+    ///两倍数值
+    var double      : Int       { return self * 2               }
+    ///三倍数值
+    var triple      : Int       { return self * 3               }
+    ///平方数
+    var square      : Int       { return (self * self)          }
+    ///立方数
+    var cube        : Int       { return (self * self * self)   }
+    
+    ///是否在开区间内
+    func isGreaterThan(min : Int, lessThan max : Int) -> Bool {
+        if self > min && self < max {
+            return true
+        }
+        return false
+    }
+    ///是否在闭区间内
+    func isEqualAndGreaterThan(min : Int, equalAndLessThan max : Int) -> Bool {
+        if self >= min && self <= max {
+            return true
+        }
+        return false
+    }
+}
+
+extension Float {
+    ///转换为CGFloat
+    var toCGFloat   : CGFloat   { return CGFloat(self)          }
+    ///转换为Int
+    var toInt       : Int       { return Int(self)              }
+    ///转换为Double
+    var toDouble    : Double    { return Double(self)           }
+    
+    ///一半数值
+    var half        : Float     { return self / 2               }
+    ///相反数值
+    var opposite    : Float     { return -self                  }
+    ///绝对值
+    var absolute    : Float     { return abs(self)              }
+    ///两倍数值
+    var double      : Float     { return self * 2               }
+    ///三倍数值
+    var triple      : Float     { return self * 3               }
+    ///平方数
+    var square      : Float     { return (self * self)          }
+    ///立方数
+    var cube        : Float     { return (self * self * self)   }
+    
+    ///是否在开区间内
+    func isGreaterThan(min : Float, lessThan max : Float) -> Bool {
+        if self > min && self < max {
+            return true
+        }
+        return false
+    }
+    ///是否在闭区间内
+    func isEqualAndGreaterThan(min : Float, equalAndLessThan max : Float) -> Bool {
+        if self >= min && self <= max {
+            return true
+        }
+        return false
+    }
+}
+
+extension Double {
+    ///转换为CGFloat
+    var toCGFloat   : CGFloat   { return CGFloat(self)          }
+    ///转换为Float
+    var toFloat     : Float     { return Float(self)            }
+    ///转换为Int
+    var toInt       : Int       { return Int(self)              }
+    
+    ///一半数值
+    var half        : Double    { return self / 2               }
+    ///相反数值
+    var opposite    : Double    { return -self                  }
+    ///绝对值
+    var absolute    : Double    { return abs(self)              }
+    ///两倍数值
+    var double      : Double    { return self * 2               }
+    ///三倍数值
+    var triple      : Double    { return self * 3               }
+    ///平方数
+    var square      : Double    { return (self * self)          }
+    ///立方数
+    var cube        : Double    { return (self * self * self)   }
+    
+    ///是否在开区间内
+    func isGreaterThan(min : Double, lessThan max : Double) -> Bool {
+        if self > min && self < max {
+            return true
+        }
+        return false
+    }
+    ///是否在闭区间内
+    func isEqualAndGreaterThan(min : Double, equalAndLessThan max : Double) -> Bool {
+        if self >= min && self <= max {
+            return true
+        }
+        return false
+    }
+}
\ No newline at end of file
diff --git a/MJAlertView-Swift/StringExtension.swift b/MJAlertView-Swift/StringExtension.swift
new file mode 100644
index 0000000..6870118
--- /dev/null
+++ b/MJAlertView-Swift/StringExtension.swift
@@ -0,0 +1,145 @@
+//
+//  StringExtension.swift
+//  HealthPlus
+//
+//  Created by Jason.Chengzi on 16/05/17.
+//  Copyright © 2016年 Hvit. All rights reserved.
+//
+import UIKit
+
+extension String {
+    ///获取NSString对象
+    var toNSString : NSString {
+        return NSString(string: self)
+    }
+    ///获取字符串长度
+    var length : Int {
+        return self.characters.count
+    }
+    
+    ///判断是否为整数
+    var isInt : Bool {
+        if Int(self) != nil {
+            return true
+        } else {
+            return false
+        }
+    }
+    ///判断是否为浮点数
+    var isFloat : Bool {
+        if Float(self) != nil {
+            return true
+        } else {
+            return false
+        }
+    }
+    ///判断是否为长浮点数
+    var isDouble : Bool {
+        if Double(self) != nil {
+            return true
+        } else {
+            return false
+        }
+    }
+    
+    ///尝试转换为整型
+    var nullableInt : Int? {
+        return Int(self)
+    }
+    ///尝试转换为浮点数
+    var nullableFloat : Float? {
+        return Float(self)
+    }
+    ///尝试转换为长浮点数
+    var nullableDouble : Double? {
+        return Double(self)
+    }
+    
+    ///强制转换为整型，失败返回0
+    var toInt : Int {
+        return Int(self) ?? 0
+    }
+    ///强制转换为浮点数，失败返回0
+    var toFloat : Float {
+        return Float(self) ?? Float(0)
+    }
+    ///强制转换为长浮点数，失败返回0
+    var toDouble : Double {
+        return Double(self) ?? Double(0)
+    }
+    
+    ///获取第一个字母
+    var firstLetter : String {
+        var ret = ""
+        if !self.canBeConvertedToEncoding(NSASCIIStringEncoding) {
+            ret = self.letters.firstLetter
+        } else {
+            ret = "\("\(self.characters.first)" ?? "")"
+        }
+        return ret
+    }
+    
+    var letters : String {
+        let str = NSMutableString(string: self)
+        if CFStringTransform(str, nil, kCFStringTransformMandarinLatin, false) {
+            if CFStringTransform(str, nil, kCFStringTransformStripDiacritics, false) {
+                return str as String
+            }
+        }
+        return self
+    }
+
+    func getFirstLetter() -> String {
+        return self.firstLetter
+    }
+    
+    ///通过字体获取字符串的尺寸
+    func sizeWithFont(font : UIFont) -> CGSize {
+        //如果没有内容
+        guard self.isEmpty == false else {
+            return CGSizeZero
+        }
+        return self.toNSString.sizeWithAttributes([NSFontAttributeName : font])
+    }
+    ///通过字体和固定宽度计算字符串的高度
+    func heightWithWidth(width : CGFloat, font : UIFont) -> CGFloat {
+        //如果没有内容
+        guard self.isEmpty == false else {
+            return CGFloat(0)
+        }
+        return self.sizeWithFont(font).width / width
+    }
+    ///截取指定长度的字符串
+    func substringWithStartPosition(start : Int, andEndPosition end : Int) -> String {
+        return self.substringWithRange(self.startIndex.advancedBy(start)..<self.startIndex.advancedBy(end))
+    }
+    ///判断是否满足正则表达式
+    func isMatchingPattern(pattern : MCPattern) -> Bool {
+        let regex : NSRegularExpression? = try? NSRegularExpression(pattern: pattern.pattern, options: NSRegularExpressionOptions.CaseInsensitive)
+        if let matches = regex?.matchesInString(self, options: [], range: NSMakeRange(0, self.toNSString.length)) {
+            return matches.count > 0
+        } else {
+            return false
+        }
+    }
+    
+    //MD5加密字符串
+    func md5() -> String {
+        let str = self.cStringUsingEncoding(NSUTF8StringEncoding)
+        let strLen = CUnsignedInt(self.lengthOfBytesUsingEncoding(NSUTF8StringEncoding))
+        let digestLen = Int(CC_MD5_DIGEST_LENGTH)
+        let result = UnsafeMutablePointer<CUnsignedChar>.alloc(digestLen)
+        CC_MD5(str!, strLen, result)
+        let hash = NSMutableString()
+        for i in 0..<digestLen {
+            hash.appendFormat("%02x", result[i])
+        }
+        result.destroy()
+        return String(format: hash as String)
+    }
+    
+}
+
+struct MCPattern {
+    var pattern : String
+}
\ No newline at end of file
diff --git a/MJAlertView-Swift/UIColorExtension-Instance.swift b/MJAlertView-Swift/UIColorExtension-Instance.swift
new file mode 100644
index 0000000..dbb028c
--- /dev/null
+++ b/MJAlertView-Swift/UIColorExtension-Instance.swift
@@ -0,0 +1,135 @@
+//
+//  UIColorExtension.swift
+//  HealthPlus
+//
+//  Created by Jason.Chengzi on 16/05/13.
+//  Copyright © 2016年 Hvit. All rights reserved.
+//
+import UIKit
+
+//MARK: - UIColor
+extension UIColor {
+    
+    ///CGFloat类型的RGB值
+    var components : (red : CGFloat, green : CGFloat, blue : CGFloat, alpha : CGFloat) {
+        var fRed    : CGFloat = 0
+        var fGreen  : CGFloat = 0
+        var fBlue   : CGFloat = 0
+        var fAlpha  : CGFloat = 0
+        
+        self.getRed(&fRed, green: &fGreen, blue: &fBlue, alpha: &fAlpha)
+        
+        return (fRed, fGreen, fBlue, fAlpha)
+    }
+    ///Int类型的RGB值
+    var RGBValues : (red : Int, green : Int, blue : Int, alpha : CGFloat) {
+        let components = self.components
+        return ((components.red * 255).toInt, (components.green * 255).toInt, (components.blue * 255).toInt, components.alpha)
+    }
+    
+    var redComponent    : CGFloat {
+        return self.components.red
+    }
+    var greenComponent  : CGFloat {
+        return self.components.green
+    }
+    var blueComponent   : CGFloat {
+        return self.components.blue
+    }
+    var alphaComponent  : CGFloat {
+        return self.components.alpha
+    }
+    
+    var coreImageColor : CoreImage.CIColor? {
+        return CoreImage.CIColor(color: self)
+    }
+    
+    var isLight : Bool {
+        var white : CGFloat = 0
+        self.getWhite(&white, alpha: nil)
+        
+        if white >= 0.5 {
+            return true
+        } else {
+            return false
+        }
+    }
+    
+    ///便捷颜色。色相、饱和度、亮度、通透度
+    class func colorWithHue(hue : CGFloat, saturation : CGFloat, brightness : CGFloat, andAlpha alpha : CGFloat) -> UIColor {
+        return UIColor(
+            hue: hue / 256,
+            saturation: saturation / 256,
+            brightness: brightness / 256,
+            alpha: alpha
+        )
+    }
+    class func colorWithHue(hue : CGFloat, saturation : CGFloat, brightness : CGFloat) -> UIColor {
+        return colorWithHue(hue, saturation: saturation, brightness: brightness, andAlpha: 1)
+    }
+    ///便捷颜色初始化
+    class func colorWithRed(red: CGFloat, green: CGFloat, blue: CGFloat, andAlpha alpha: CGFloat) -> UIColor {
+        return UIColor(
+            red: (red / 255.0),
+            green: (green / 255.0),
+            blue: (blue / 255.0),
+            alpha: alpha
+        )
+    }
+    class func colorWithRed(red: CGFloat, green: CGFloat, blue: CGFloat) -> UIColor {
+        return UIColor.colorWithRed(
+            red,
+            green: green,
+            blue: blue,
+            andAlpha: 1
+        )
+    }
+    ///16进制初始化颜色
+    class func colorWithHex(hex h: Int, andAlpha alpha: CGFloat) -> UIColor {
+        let red = CGFloat(((h & 0xFF0000) >> 16))
+        let green = CGFloat(((h & 0xFF00) >> 8))
+        let blue = CGFloat((h & 0xFF))
+        
+        return UIColor.colorWithRed(
+            red, green:
+            green,
+            blue: blue,
+            andAlpha: alpha
+        )
+    }
+    class func colorWithHex(hex h: Int) -> UIColor {
+        return UIColor.colorWithHex(hex: h, andAlpha: 1)
+    }
+    class func colorWithHex(hex : String, andAlpha alpha : CGFloat) -> UIColor {
+        var cString : String = hex.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()).uppercaseString
+        
+        if cString.hasPrefix("#") {
+            cString = cString.substringFromIndex(cString.startIndex.advancedBy(1))
+        }
+        
+        if cString.characters.count != 6 {
+            return UIColor.grayColor()
+        }
+        
+        var rgbValue : UInt32 = 0
+        NSScanner(string: cString).scanHexInt(&rgbValue)
+        
+        return UIColor(
+            red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0,
+            green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0,
+            blue: CGFloat(rgbValue & 0x0000FF) / 255.0,
+            alpha: alpha
+        )
+    }
+    class func colorWithHex(hex : String) -> UIColor {
+        return UIColor.colorWithHex(hex, andAlpha: 1)
+    }
+    class func randomColor() -> UIColor {
+        return UIColor(
+            hue: (CGFloat(arc4random()) % 256 / 256.0),
+            saturation: (CGFloat(arc4random()) % 128 / 256.0) + 0.5,
+            brightness: (CGFloat(arc4random()) % 128 / 256.0) + 0.5,
+            alpha: 1
+        )
+    }
+}
diff --git a/MJAlertView-Swift/UIViewExtension-MJAlertView.swift b/MJAlertView-Swift/UIViewExtension-MJAlertView.swift
new file mode 100644
index 0000000..a11026b
--- /dev/null
+++ b/MJAlertView-Swift/UIViewExtension-MJAlertView.swift
@@ -0,0 +1,337 @@
+//
+//  UIViewExtension-MJAlertView.swift
+//  ChildrenGuardian
+//
+//  Created by Jason.Chengzi on 7/13/16.
+//  Copyright © 2016 Hvit. All rights reserved.
+//
+
+import UIKit
+import QuartzCore
+
+private let MJAV_APPDELEGATE            = UIApplication.sharedApplication().delegate
+
+private let MJAV_FONT_SIZE_LABEL        = 18.toCGFloat
+private let MJAV_FONT_SIZE_CANCEL       = 13.toCGFloat
+
+private let MJAV_NOTIFIER_LABEL_FONT    = UIFont(name: "HelveticaNeue-Light", size: MJAV_FONT_SIZE_LABEL)
+private let MJAV_NOTIFIER_CANCEL_FONT   = UIFont(name: "HelveticaNeue", size: MJAV_FONT_SIZE_CANCEL)
+
+private let MJAV_Tag                    = 181200
+private let MJAV_xPadding               = 18.0.toCGFloat
+private let MJAV_Height_Label           = 45.0.toCGFloat
+private let MJAV_Height_Cancel_Button   = 30.0.toCGFloat
+private let MJAV_Height_Separator       = 1.0.toCGFloat
+private let MJAV_Height_FromBottom      = 70.0.toCGFloat
+private let MJAV_Width_Max              = 290.0.toCGFloat
+
+enum MJAlertViewStyle {
+    case Success
+    case Error
+    case Warn
+    case Info
+    case SubjectTheme
+    case Default
+    
+    var backgroundColor : UIColor {
+        switch self {
+        case .Success:
+            return UIColor.colorWithHex(hex: 0x2ecc71)
+        case .Error:
+            return UIColor.colorWithHex(hex: 0xc0392b)
+        case .Warn:
+            return UIColor.colorWithHex(hex: 0xe67e22)
+        case .Info:
+            return UIColor.colorWithHex(hex: 0x2980b9)
+        case .SubjectTheme:
+            return AppearenceDefaults.COLOR_THEME
+        case .Default:
+            return UIColor.blackColor().colorWithAlphaComponent(0.8)
+        }
+    }
+    
+    var textColor : UIColor {
+        switch self {
+        case .Success:
+            return UIColor.whiteColor()
+        case .Error:
+            return UIColor.whiteColor()
+        case .Warn:
+            return UIColor.whiteColor()
+        case .Info:
+            return UIColor.whiteColor()
+        case .SubjectTheme:
+//            return UIColor.whiteColor()
+            if self.backgroundColor.isLight {
+                return UIColor.blackColor()
+            } else {
+                return UIColor.whiteColor()
+            }
+        case .Default:
+            return UIColor.whiteColor()
+        }
+    }
+}
+
+extension UIView {
+    class func makeSuccessNotificationWithText(text : String) {
+        UIView.makeAlertViewWithText(text, type: .Success)
+    }
+    class func makeWarnNotificationWithText(text : String) {
+        UIView.makeAlertViewWithText(text, type: .Warn)
+    }
+    class func makeErrorNotificationWithText(text : String) {
+        UIView.makeAlertViewWithText(text, type: .Error)
+    }
+    class func makeInfoNotificationWithText(text : String) {
+        UIView.makeAlertViewWithText(text, type: .Info)
+    }
+    class func makeAlertViewWithText(text : String, type : MJAlertViewStyle = .Default) {
+        
+        let shouldDismiss = true
+        
+        if let screenBounds = MJAV_APPDELEGATE?.window!!.bounds {
+            let attributes : [String : AnyObject] = [NSFontAttributeName : MJAV_NOTIFIER_LABEL_FONT ?? UIFont.systemFontOfSize(MJAV_FONT_SIZE_LABEL)]
+            
+            let height = MJAV_Height_Label
+            let width = CGFloat.max
+            let notifierRect = text.toNSString.boundingRectWithSize(
+                                                    CGSize(
+                                                        width: width,
+                                                        height: height
+                                                    ),
+                                                    options: NSStringDrawingOptions.UsesLineFragmentOrigin,
+                                                    attributes: attributes,
+                                                    context: nil
+                                                )
+            let notifierWidth = CGFloat.MIN(lbs: CGRectGetWidth(notifierRect) + MJAV_xPadding.double, rbs: MJAV_Width_Max)
+            let xOffset = (CGRectGetWidth(screenBounds) - notifierWidth).half
+            
+            let notifierHeight = MJAV_Height_Label
+            
+//            if !shouldDismiss {
+//                notifierHeight += (MJAV_Height_Cancel_Button + MJAV_Height_Separator)
+//            }
+            
+            let yOffset = CGRectGetHeight(screenBounds) - notifierHeight - MJAV_Height_FromBottom
+            
+            let finalFrame = CGRect(x: xOffset, y: yOffset, width: notifierWidth, height: notifierHeight)
+            
+            let notifierView = isNotifierExistedAlready()
+            
+            if let view = notifierView {
+                updateNotifierWithAnimation(notifierView, andText: text, andCompletion: { (finished) in
+                    var atLastFrame = finalFrame
+                    atLastFrame.origin.y = finalFrame.origin.y + 8
+                    view.frame = atLastFrame
+                    
+                    var textLabel : UILabel?
+                    for subview in view.subviews {
+                        if subview is UILabel {
+                            textLabel = subview as? UILabel
+                        }
+                        
+                        if subview is UIImageView || subview is UIButton {
+                            subview.removeFromSuperview()
+                        }
+                    }
+                    
+                    textLabel?.text = text
+                    textLabel?.frame = CGRect(x: MJAV_xPadding, y: 0, width: notifierWidth - MJAV_xPadding.double, height: MJAV_Height_Label)
+                    
+                    if !shouldDismiss {
+                        let separatorImageView = UIImageView(frame: CGRect(x: 0, y: CGRectGetHeight(textLabel!.frame), width: CGRectGetWidth(view.frame), height: MJAV_Height_Separator))
+                        separatorImageView.backgroundColor = UIColor.colorWithHex(hex: 0xF94137)
+                        view.addSubview(separatorImageView)
+                        
+                        let cancelButton = UIButton(type: UIButtonType.Custom)
+                        cancelButton.frame = CGRect(x: 0, y: CGRectGetMaxY(separatorImageView.frame), width: CGRectGetWidth(view.frame), height: MJAV_Height_Cancel_Button)
+//                        cancelButton.setNormalTitleColor(UIColor.whiteColor())
+                        cancelButton.backgroundColor = UIColor.colorWithHex(hex: 0x000000)
+                        cancelButton.addTarget(self, action: #selector(UIView.buttonCancelClicked(_:)), forControlEvents: UIControlEvents.TouchUpInside)
+                        cancelButton.titleLabel?.font = MJAV_NOTIFIER_CANCEL_FONT
+                        view.addSubview(cancelButton)
+                    }
+                    
+                    UIView.animateWithDuration(0.4, delay: 0, options: UIViewAnimationOptions.CurveEaseOut, animations: { 
+                        view.alpha = 1
+                        view.frame = finalFrame
+                    }, completion: nil)
+                })
+                
+                if shouldDismiss {
+                    performSelector(#selector(UIView.dismissMJNotifier), withObject: nil, afterDelay: 2.0)
+                }
+            } else {
+                let notifierView = UIView(frame: CGRect(x: xOffset, y: CGRectGetHeight(screenBounds), width: notifierWidth, height: notifierHeight))
+//                notifierView.backgroundColor = UIColor.colorWithHex(hex: 0xF94137)
+                notifierView.backgroundColor = type.backgroundColor
+                notifierView.tag = MJAV_Tag
+                notifierView.clipsToBounds = true
+                notifierView.layer.cornerRadius = 5
+                
+                MJAV_APPDELEGATE?.window??.addSubview(notifierView)
+                MJAV_APPDELEGATE?.window??.bringSubviewToFront(notifierView)
+                
+                let textLabel = UILabel(frame: CGRect(x: MJAV_xPadding, y: 0, width: notifierWidth - MJAV_xPadding.double, height: MJAV_Height_Label))
+                textLabel.adjustsFontSizeToFitWidth = true
+                textLabel.backgroundColor = UIColor.clearColor()
+                textLabel.textAlignment = .Center
+//                textLabel.textColor = UIColor.colorWithHex(hex: 0xFFFFFF)
+                textLabel.textColor = type.textColor
+                textLabel.font = MJAV_NOTIFIER_LABEL_FONT
+                textLabel.minimumScaleFactor = 0.7
+                textLabel.text = text
+                notifierView.addSubview(textLabel)
+                
+                if shouldDismiss {
+                    self.performSelector(#selector(UIView.dismissMJNotifier), withObject: nil, afterDelay: 2)
+//                } else {
+//                    let separatorImageView = UIImageView(frame: CGRect(x: 0, y: CGRectGetHeight(textLabel.frame), width: CGRectGetWidth(notifierView.frame), height: MJAV_Height_Separator))
+//                    separatorImageView.backgroundColor = UIColor.colorWithHex(hex: 0xF94137)
+//                    notifierView.addSubview(separatorImageView)
+//                    
+//                    let cancelButton = UIButton(type: UIButtonType.Custom)
+//                    cancelButton.frame = CGRect(x: 0, y: CGRectGetMaxY(separatorImageView.frame), width: CGRectGetWidth(notifierView.frame), height: MJAV_Height_Cancel_Button)
+//                    cancelButton.backgroundColor = UIColor.colorWithHex(hex: 0x000000)
+//                    cancelButton.addTarget(self, action: #selector(UIView.buttonCancelClicked(_:)), forControlEvents: UIControlEvents.TouchUpInside)
+//                    cancelButton.titleLabel?.font = MJAV_NOTIFIER_CANCEL_FONT
+//                    notifierView.addSubview(cancelButton)
+                }
+                
+                self.startEntryAnimation(notifierView, withFinalFrame: finalFrame)
+            }
+        }
+    }
+    class func dismissMJNotifier() {
+        NSObject.cancelPreviousPerformRequestsWithTarget(self, selector: #selector(UIView.dismissMJNotifier), object: nil)
+        
+        var notifier : UIView?
+        
+        for subview in MJAV_APPDELEGATE!.window!!.subviews {
+            if subview.tag == MJAV_Tag && subview.isKindOfClass(UIView.self) {
+                notifier = subview
+            }
+        }
+        
+        startExitAnimation(notifier)
+    }
+}
+
+private extension UIView {
+    class func isNotifierExistedAlready() -> UIView? {
+        NSObject.cancelPreviousPerformRequestsWithTarget(self, selector: #selector(UIView.dismissMJNotifier), object: nil)
+        
+        var notifier : UIView?
+        
+        for subview in MJAV_APPDELEGATE!.window!!.subviews {
+            if subview.tag == MJAV_Tag && subview.isKindOfClass(UIView.self) {
+                notifier = subview
+            }
+        }
+        
+        return notifier
+    }
+    
+    @objc class func buttonCancelClicked(sender : UIButton) {
+        dismissMJNotifier()
+    }
+    
+    class func updateNotifierWithAnimation(notifierView : UIView?, andText text : String, andCompletion completion : ((finished : Bool) -> Void)?) {
+        if let view = notifierView {
+            var finalFrame = view.frame
+            finalFrame.origin.y = finalFrame.origin.y + 8
+            
+            UIView.animateWithDuration( 0.2,
+                                        delay: 0,
+                                        options: UIViewAnimationOptions.CurveEaseOut,
+                                        animations: {
+                                            view.alpha = 0
+                                            view.frame = finalFrame
+                                        },
+                                        completion: { (finished : Bool) in
+                                            completion?(finished: finished)
+                                        }
+                                    )
+        }
+    }
+    
+    class func startEntryAnimation(notifierView : UIView?, withFinalFrame finalFrame : CGRect) {
+        
+        if let view = notifierView {
+            
+            var mutableFinalFrame = finalFrame
+            
+            let finalYOffset = mutableFinalFrame.origin.y
+            mutableFinalFrame.origin.y = finalFrame.origin.y - 15
+            
+            let transform = transformWithXAxisValue(-0.1, andAngle: 45)
+            view.layer.zPosition = 400
+            view.layer.transform = transform
+            
+            UIView.animateWithDuration(0.2, delay: 0, options: UIViewAnimationOptions.CurveEaseOut, animations: {
+                
+                view.frame = mutableFinalFrame
+                
+                let anotherTransform = transformWithXAxisValue(0.1, andAngle: 15)
+                view.layer.zPosition = 400
+                view.layer.transform = anotherTransform
+                
+            }, completion: { (finished : Bool) in
+                UIView.animateWithDuration(0.4, delay: 0, options: UIViewAnimationOptions.CurveEaseIn, animations: {
+                    
+                    var atLastFrame = mutableFinalFrame
+                    atLastFrame.origin.y = finalYOffset
+                    view.frame = atLastFrame
+                    
+                    let transform = self.transformWithXAxisValue(0.0, andAngle: 90)
+                    view.layer.zPosition = 400
+                    view.layer.transform = transform
+                    
+                }, completion: nil)
+            })
+        }
+        
+    }
+    
+    class func startExitAnimation(notifierView : UIView?) {
+        
+        if let view = notifierView {
+        
+            let screenBounds = MJAV_APPDELEGATE!.window!!.bounds
+            
+            var notifierFrame = view.frame
+            let finalYOffset = notifierFrame.origin.y - 12
+            notifierFrame.origin.y = finalYOffset
+            
+            UIView.animateWithDuration(0.3, delay: 0, options: UIViewAnimationOptions.CurveEaseOut, animations: { 
+                view.frame = notifierFrame
+                let transform = transformWithXAxisValue(0.1, andAngle: 30)
+                view.layer.zPosition = 400
+                view.layer.transform = transform
+            }, completion: { (finished : Bool) in
+                UIView.animateWithDuration(0.15, delay: 0, options: UIViewAnimationOptions.CurveEaseIn, animations: { 
+                    var atLastFrame = view.frame
+                    atLastFrame.origin.y = CGRectGetHeight(screenBounds)
+                    view.frame = atLastFrame
+                    
+                    let transform = transformWithXAxisValue(-1, andAngle: 90)
+                    view.layer.zPosition = 400
+                    view.layer.transform = transform
+                }, completion: { (finished : Bool) in
+                    view.removeFromSuperview()
+                })
+            })
+        }
+    }
+    
+    class func transformWithXAxisValue(xValue : CGFloat, andAngle angle : CGFloat) -> CATransform3D {
+        var transform = CATransform3DIdentity
+        
+        transform.m34 = 1.0 / -1000
+        
+        transform = CATransform3DRotate(transform, angle * M_PI.toCGFloat / 180, xValue, 0, 0)
+        
+        return transform
+    }
+}
\ No newline at end of file
diff --git a/MJAlertViewDemo-Swift/MJAlertView-Swift/CGFloatExtension.swift b/MJAlertViewDemo-Swift/MJAlertView-Swift/CGFloatExtension.swift
new file mode 100644
index 0000000..d89a4ed
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertView-Swift/CGFloatExtension.swift
@@ -0,0 +1,41 @@
+//
+//  CGFloatExtension.swift
+//  ChildrenGuardian
+//
+//  Created by Jason.Chengzi on 16/06/17.
+//  Copyright © 2016年 Hvit. All rights reserved.
+//
+
+extension CGFloat {
+    ///转换为Float
+    var toFloat     : Float     { return Float(self)            }
+    ///转换为Int
+    var toInt       : Int       { return Int(self)              }
+    ///转换为Double
+    var toDouble    : Double    { return Double(self)           }
+    
+    ///一半数值
+    var half        : CGFloat   { return self / 2               }
+    ///相反数值
+    var opposite    : CGFloat   { return -self                  }
+    ///绝对值
+    var absolute    : CGFloat   { return abs(self)              }
+    ///两倍数值
+    var double      : CGFloat   { return self * 2               }
+    ///三倍数值
+    var triple      : CGFloat   { return self * 3               }
+    ///平方数
+    var square      : CGFloat   { return (self * self)          }
+    ///立方数
+    var cube        : CGFloat   { return (self * self * self)   }
+    
+    static func MIN(lbs lbs : CGFloat, rbs : CGFloat) -> CGFloat {
+        if lbs > rbs {
+            return rbs
+        } else if lbs < rbs {
+            return lbs
+        } else {
+            return lbs
+        }
+    }
+}
\ No newline at end of file
diff --git a/MJAlertViewDemo-Swift/MJAlertView-Swift/NumberExtension.swift b/MJAlertViewDemo-Swift/MJAlertView-Swift/NumberExtension.swift
new file mode 100644
index 0000000..9a8078b
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertView-Swift/NumberExtension.swift
@@ -0,0 +1,125 @@
+//
+//  NumberExtension.swift
+//  HealthPlus
+//
+//  Created by Jason.Chengzi on 16/05/20.
+//  Copyright © 2016年 Hvit. All rights reserved.
+//
+import UIKit
+
+extension Int {
+    ///转换为CGFloat
+    var toCGFloat   : CGFloat   { return CGFloat(self)          }
+    ///转换为Float
+    var toFloat     : Float     { return Float(self)            }
+    ///转换为Double
+    var toDouble    : Double    { return Double(self)           }
+    
+    ///一半数值
+    var half        : Int       { return self / 2               }
+    ///相反数值
+    var opposite    : Int       { return -self                  }
+    ///绝对值
+    var absolute    : Int       { return abs(self)              }
+    ///两倍数值
+    var double      : Int       { return self * 2               }
+    ///三倍数值
+    var triple      : Int       { return self * 3               }
+    ///平方数
+    var square      : Int       { return (self * self)          }
+    ///立方数
+    var cube        : Int       { return (self * self * self)   }
+    
+    ///是否在开区间内
+    func isGreaterThan(min : Int, lessThan max : Int) -> Bool {
+        if self > min && self < max {
+            return true
+        }
+        return false
+    }
+    ///是否在闭区间内
+    func isEqualAndGreaterThan(min : Int, equalAndLessThan max : Int) -> Bool {
+        if self >= min && self <= max {
+            return true
+        }
+        return false
+    }
+}
+
+extension Float {
+    ///转换为CGFloat
+    var toCGFloat   : CGFloat   { return CGFloat(self)          }
+    ///转换为Int
+    var toInt       : Int       { return Int(self)              }
+    ///转换为Double
+    var toDouble    : Double    { return Double(self)           }
+    
+    ///一半数值
+    var half        : Float     { return self / 2               }
+    ///相反数值
+    var opposite    : Float     { return -self                  }
+    ///绝对值
+    var absolute    : Float     { return abs(self)              }
+    ///两倍数值
+    var double      : Float     { return self * 2               }
+    ///三倍数值
+    var triple      : Float     { return self * 3               }
+    ///平方数
+    var square      : Float     { return (self * self)          }
+    ///立方数
+    var cube        : Float     { return (self * self * self)   }
+    
+    ///是否在开区间内
+    func isGreaterThan(min : Float, lessThan max : Float) -> Bool {
+        if self > min && self < max {
+            return true
+        }
+        return false
+    }
+    ///是否在闭区间内
+    func isEqualAndGreaterThan(min : Float, equalAndLessThan max : Float) -> Bool {
+        if self >= min && self <= max {
+            return true
+        }
+        return false
+    }
+}
+
+extension Double {
+    ///转换为CGFloat
+    var toCGFloat   : CGFloat   { return CGFloat(self)          }
+    ///转换为Float
+    var toFloat     : Float     { return Float(self)            }
+    ///转换为Int
+    var toInt       : Int       { return Int(self)              }
+    
+    ///一半数值
+    var half        : Double    { return self / 2               }
+    ///相反数值
+    var opposite    : Double    { return -self                  }
+    ///绝对值
+    var absolute    : Double    { return abs(self)              }
+    ///两倍数值
+    var double      : Double    { return self * 2               }
+    ///三倍数值
+    var triple      : Double    { return self * 3               }
+    ///平方数
+    var square      : Double    { return (self * self)          }
+    ///立方数
+    var cube        : Double    { return (self * self * self)   }
+    
+    ///是否在开区间内
+    func isGreaterThan(min : Double, lessThan max : Double) -> Bool {
+        if self > min && self < max {
+            return true
+        }
+        return false
+    }
+    ///是否在闭区间内
+    func isEqualAndGreaterThan(min : Double, equalAndLessThan max : Double) -> Bool {
+        if self >= min && self <= max {
+            return true
+        }
+        return false
+    }
+}
\ No newline at end of file
diff --git a/MJAlertViewDemo-Swift/MJAlertView-Swift/StringExtension.swift b/MJAlertViewDemo-Swift/MJAlertView-Swift/StringExtension.swift
new file mode 100644
index 0000000..6870118
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertView-Swift/StringExtension.swift
@@ -0,0 +1,145 @@
+//
+//  StringExtension.swift
+//  HealthPlus
+//
+//  Created by Jason.Chengzi on 16/05/17.
+//  Copyright © 2016年 Hvit. All rights reserved.
+//
+import UIKit
+
+extension String {
+    ///获取NSString对象
+    var toNSString : NSString {
+        return NSString(string: self)
+    }
+    ///获取字符串长度
+    var length : Int {
+        return self.characters.count
+    }
+    
+    ///判断是否为整数
+    var isInt : Bool {
+        if Int(self) != nil {
+            return true
+        } else {
+            return false
+        }
+    }
+    ///判断是否为浮点数
+    var isFloat : Bool {
+        if Float(self) != nil {
+            return true
+        } else {
+            return false
+        }
+    }
+    ///判断是否为长浮点数
+    var isDouble : Bool {
+        if Double(self) != nil {
+            return true
+        } else {
+            return false
+        }
+    }
+    
+    ///尝试转换为整型
+    var nullableInt : Int? {
+        return Int(self)
+    }
+    ///尝试转换为浮点数
+    var nullableFloat : Float? {
+        return Float(self)
+    }
+    ///尝试转换为长浮点数
+    var nullableDouble : Double? {
+        return Double(self)
+    }
+    
+    ///强制转换为整型，失败返回0
+    var toInt : Int {
+        return Int(self) ?? 0
+    }
+    ///强制转换为浮点数，失败返回0
+    var toFloat : Float {
+        return Float(self) ?? Float(0)
+    }
+    ///强制转换为长浮点数，失败返回0
+    var toDouble : Double {
+        return Double(self) ?? Double(0)
+    }
+    
+    ///获取第一个字母
+    var firstLetter : String {
+        var ret = ""
+        if !self.canBeConvertedToEncoding(NSASCIIStringEncoding) {
+            ret = self.letters.firstLetter
+        } else {
+            ret = "\("\(self.characters.first)" ?? "")"
+        }
+        return ret
+    }
+    
+    var letters : String {
+        let str = NSMutableString(string: self)
+        if CFStringTransform(str, nil, kCFStringTransformMandarinLatin, false) {
+            if CFStringTransform(str, nil, kCFStringTransformStripDiacritics, false) {
+                return str as String
+            }
+        }
+        return self
+    }
+
+    func getFirstLetter() -> String {
+        return self.firstLetter
+    }
+    
+    ///通过字体获取字符串的尺寸
+    func sizeWithFont(font : UIFont) -> CGSize {
+        //如果没有内容
+        guard self.isEmpty == false else {
+            return CGSizeZero
+        }
+        return self.toNSString.sizeWithAttributes([NSFontAttributeName : font])
+    }
+    ///通过字体和固定宽度计算字符串的高度
+    func heightWithWidth(width : CGFloat, font : UIFont) -> CGFloat {
+        //如果没有内容
+        guard self.isEmpty == false else {
+            return CGFloat(0)
+        }
+        return self.sizeWithFont(font).width / width
+    }
+    ///截取指定长度的字符串
+    func substringWithStartPosition(start : Int, andEndPosition end : Int) -> String {
+        return self.substringWithRange(self.startIndex.advancedBy(start)..<self.startIndex.advancedBy(end))
+    }
+    ///判断是否满足正则表达式
+    func isMatchingPattern(pattern : MCPattern) -> Bool {
+        let regex : NSRegularExpression? = try? NSRegularExpression(pattern: pattern.pattern, options: NSRegularExpressionOptions.CaseInsensitive)
+        if let matches = regex?.matchesInString(self, options: [], range: NSMakeRange(0, self.toNSString.length)) {
+            return matches.count > 0
+        } else {
+            return false
+        }
+    }
+    
+    //MD5加密字符串
+    func md5() -> String {
+        let str = self.cStringUsingEncoding(NSUTF8StringEncoding)
+        let strLen = CUnsignedInt(self.lengthOfBytesUsingEncoding(NSUTF8StringEncoding))
+        let digestLen = Int(CC_MD5_DIGEST_LENGTH)
+        let result = UnsafeMutablePointer<CUnsignedChar>.alloc(digestLen)
+        CC_MD5(str!, strLen, result)
+        let hash = NSMutableString()
+        for i in 0..<digestLen {
+            hash.appendFormat("%02x", result[i])
+        }
+        result.destroy()
+        return String(format: hash as String)
+    }
+    
+}
+
+struct MCPattern {
+    var pattern : String
+}
\ No newline at end of file
diff --git a/MJAlertViewDemo-Swift/MJAlertView-Swift/UIColorExtension-Instance.swift b/MJAlertViewDemo-Swift/MJAlertView-Swift/UIColorExtension-Instance.swift
new file mode 100644
index 0000000..dbb028c
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertView-Swift/UIColorExtension-Instance.swift
@@ -0,0 +1,135 @@
+//
+//  UIColorExtension.swift
+//  HealthPlus
+//
+//  Created by Jason.Chengzi on 16/05/13.
+//  Copyright © 2016年 Hvit. All rights reserved.
+//
+import UIKit
+
+//MARK: - UIColor
+extension UIColor {
+    
+    ///CGFloat类型的RGB值
+    var components : (red : CGFloat, green : CGFloat, blue : CGFloat, alpha : CGFloat) {
+        var fRed    : CGFloat = 0
+        var fGreen  : CGFloat = 0
+        var fBlue   : CGFloat = 0
+        var fAlpha  : CGFloat = 0
+        
+        self.getRed(&fRed, green: &fGreen, blue: &fBlue, alpha: &fAlpha)
+        
+        return (fRed, fGreen, fBlue, fAlpha)
+    }
+    ///Int类型的RGB值
+    var RGBValues : (red : Int, green : Int, blue : Int, alpha : CGFloat) {
+        let components = self.components
+        return ((components.red * 255).toInt, (components.green * 255).toInt, (components.blue * 255).toInt, components.alpha)
+    }
+    
+    var redComponent    : CGFloat {
+        return self.components.red
+    }
+    var greenComponent  : CGFloat {
+        return self.components.green
+    }
+    var blueComponent   : CGFloat {
+        return self.components.blue
+    }
+    var alphaComponent  : CGFloat {
+        return self.components.alpha
+    }
+    
+    var coreImageColor : CoreImage.CIColor? {
+        return CoreImage.CIColor(color: self)
+    }
+    
+    var isLight : Bool {
+        var white : CGFloat = 0
+        self.getWhite(&white, alpha: nil)
+        
+        if white >= 0.5 {
+            return true
+        } else {
+            return false
+        }
+    }
+    
+    ///便捷颜色。色相、饱和度、亮度、通透度
+    class func colorWithHue(hue : CGFloat, saturation : CGFloat, brightness : CGFloat, andAlpha alpha : CGFloat) -> UIColor {
+        return UIColor(
+            hue: hue / 256,
+            saturation: saturation / 256,
+            brightness: brightness / 256,
+            alpha: alpha
+        )
+    }
+    class func colorWithHue(hue : CGFloat, saturation : CGFloat, brightness : CGFloat) -> UIColor {
+        return colorWithHue(hue, saturation: saturation, brightness: brightness, andAlpha: 1)
+    }
+    ///便捷颜色初始化
+    class func colorWithRed(red: CGFloat, green: CGFloat, blue: CGFloat, andAlpha alpha: CGFloat) -> UIColor {
+        return UIColor(
+            red: (red / 255.0),
+            green: (green / 255.0),
+            blue: (blue / 255.0),
+            alpha: alpha
+        )
+    }
+    class func colorWithRed(red: CGFloat, green: CGFloat, blue: CGFloat) -> UIColor {
+        return UIColor.colorWithRed(
+            red,
+            green: green,
+            blue: blue,
+            andAlpha: 1
+        )
+    }
+    ///16进制初始化颜色
+    class func colorWithHex(hex h: Int, andAlpha alpha: CGFloat) -> UIColor {
+        let red = CGFloat(((h & 0xFF0000) >> 16))
+        let green = CGFloat(((h & 0xFF00) >> 8))
+        let blue = CGFloat((h & 0xFF))
+        
+        return UIColor.colorWithRed(
+            red, green:
+            green,
+            blue: blue,
+            andAlpha: alpha
+        )
+    }
+    class func colorWithHex(hex h: Int) -> UIColor {
+        return UIColor.colorWithHex(hex: h, andAlpha: 1)
+    }
+    class func colorWithHex(hex : String, andAlpha alpha : CGFloat) -> UIColor {
+        var cString : String = hex.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()).uppercaseString
+        
+        if cString.hasPrefix("#") {
+            cString = cString.substringFromIndex(cString.startIndex.advancedBy(1))
+        }
+        
+        if cString.characters.count != 6 {
+            return UIColor.grayColor()
+        }
+        
+        var rgbValue : UInt32 = 0
+        NSScanner(string: cString).scanHexInt(&rgbValue)
+        
+        return UIColor(
+            red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0,
+            green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0,
+            blue: CGFloat(rgbValue & 0x0000FF) / 255.0,
+            alpha: alpha
+        )
+    }
+    class func colorWithHex(hex : String) -> UIColor {
+        return UIColor.colorWithHex(hex, andAlpha: 1)
+    }
+    class func randomColor() -> UIColor {
+        return UIColor(
+            hue: (CGFloat(arc4random()) % 256 / 256.0),
+            saturation: (CGFloat(arc4random()) % 128 / 256.0) + 0.5,
+            brightness: (CGFloat(arc4random()) % 128 / 256.0) + 0.5,
+            alpha: 1
+        )
+    }
+}
diff --git a/MJAlertViewDemo-Swift/MJAlertView-Swift/UIViewExtension-MJAlertView.swift b/MJAlertViewDemo-Swift/MJAlertView-Swift/UIViewExtension-MJAlertView.swift
new file mode 100644
index 0000000..a11026b
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertView-Swift/UIViewExtension-MJAlertView.swift
@@ -0,0 +1,337 @@
+//
+//  UIViewExtension-MJAlertView.swift
+//  ChildrenGuardian
+//
+//  Created by Jason.Chengzi on 7/13/16.
+//  Copyright © 2016 Hvit. All rights reserved.
+//
+
+import UIKit
+import QuartzCore
+
+private let MJAV_APPDELEGATE            = UIApplication.sharedApplication().delegate
+
+private let MJAV_FONT_SIZE_LABEL        = 18.toCGFloat
+private let MJAV_FONT_SIZE_CANCEL       = 13.toCGFloat
+
+private let MJAV_NOTIFIER_LABEL_FONT    = UIFont(name: "HelveticaNeue-Light", size: MJAV_FONT_SIZE_LABEL)
+private let MJAV_NOTIFIER_CANCEL_FONT   = UIFont(name: "HelveticaNeue", size: MJAV_FONT_SIZE_CANCEL)
+
+private let MJAV_Tag                    = 181200
+private let MJAV_xPadding               = 18.0.toCGFloat
+private let MJAV_Height_Label           = 45.0.toCGFloat
+private let MJAV_Height_Cancel_Button   = 30.0.toCGFloat
+private let MJAV_Height_Separator       = 1.0.toCGFloat
+private let MJAV_Height_FromBottom      = 70.0.toCGFloat
+private let MJAV_Width_Max              = 290.0.toCGFloat
+
+enum MJAlertViewStyle {
+    case Success
+    case Error
+    case Warn
+    case Info
+    case SubjectTheme
+    case Default
+    
+    var backgroundColor : UIColor {
+        switch self {
+        case .Success:
+            return UIColor.colorWithHex(hex: 0x2ecc71)
+        case .Error:
+            return UIColor.colorWithHex(hex: 0xc0392b)
+        case .Warn:
+            return UIColor.colorWithHex(hex: 0xe67e22)
+        case .Info:
+            return UIColor.colorWithHex(hex: 0x2980b9)
+        case .SubjectTheme:
+            return AppearenceDefaults.COLOR_THEME
+        case .Default:
+            return UIColor.blackColor().colorWithAlphaComponent(0.8)
+        }
+    }
+    
+    var textColor : UIColor {
+        switch self {
+        case .Success:
+            return UIColor.whiteColor()
+        case .Error:
+            return UIColor.whiteColor()
+        case .Warn:
+            return UIColor.whiteColor()
+        case .Info:
+            return UIColor.whiteColor()
+        case .SubjectTheme:
+//            return UIColor.whiteColor()
+            if self.backgroundColor.isLight {
+                return UIColor.blackColor()
+            } else {
+                return UIColor.whiteColor()
+            }
+        case .Default:
+            return UIColor.whiteColor()
+        }
+    }
+}
+
+extension UIView {
+    class func makeSuccessNotificationWithText(text : String) {
+        UIView.makeAlertViewWithText(text, type: .Success)
+    }
+    class func makeWarnNotificationWithText(text : String) {
+        UIView.makeAlertViewWithText(text, type: .Warn)
+    }
+    class func makeErrorNotificationWithText(text : String) {
+        UIView.makeAlertViewWithText(text, type: .Error)
+    }
+    class func makeInfoNotificationWithText(text : String) {
+        UIView.makeAlertViewWithText(text, type: .Info)
+    }
+    class func makeAlertViewWithText(text : String, type : MJAlertViewStyle = .Default) {
+        
+        let shouldDismiss = true
+        
+        if let screenBounds = MJAV_APPDELEGATE?.window!!.bounds {
+            let attributes : [String : AnyObject] = [NSFontAttributeName : MJAV_NOTIFIER_LABEL_FONT ?? UIFont.systemFontOfSize(MJAV_FONT_SIZE_LABEL)]
+            
+            let height = MJAV_Height_Label
+            let width = CGFloat.max
+            let notifierRect = text.toNSString.boundingRectWithSize(
+                                                    CGSize(
+                                                        width: width,
+                                                        height: height
+                                                    ),
+                                                    options: NSStringDrawingOptions.UsesLineFragmentOrigin,
+                                                    attributes: attributes,
+                                                    context: nil
+                                                )
+            let notifierWidth = CGFloat.MIN(lbs: CGRectGetWidth(notifierRect) + MJAV_xPadding.double, rbs: MJAV_Width_Max)
+            let xOffset = (CGRectGetWidth(screenBounds) - notifierWidth).half
+            
+            let notifierHeight = MJAV_Height_Label
+            
+//            if !shouldDismiss {
+//                notifierHeight += (MJAV_Height_Cancel_Button + MJAV_Height_Separator)
+//            }
+            
+            let yOffset = CGRectGetHeight(screenBounds) - notifierHeight - MJAV_Height_FromBottom
+            
+            let finalFrame = CGRect(x: xOffset, y: yOffset, width: notifierWidth, height: notifierHeight)
+            
+            let notifierView = isNotifierExistedAlready()
+            
+            if let view = notifierView {
+                updateNotifierWithAnimation(notifierView, andText: text, andCompletion: { (finished) in
+                    var atLastFrame = finalFrame
+                    atLastFrame.origin.y = finalFrame.origin.y + 8
+                    view.frame = atLastFrame
+                    
+                    var textLabel : UILabel?
+                    for subview in view.subviews {
+                        if subview is UILabel {
+                            textLabel = subview as? UILabel
+                        }
+                        
+                        if subview is UIImageView || subview is UIButton {
+                            subview.removeFromSuperview()
+                        }
+                    }
+                    
+                    textLabel?.text = text
+                    textLabel?.frame = CGRect(x: MJAV_xPadding, y: 0, width: notifierWidth - MJAV_xPadding.double, height: MJAV_Height_Label)
+                    
+                    if !shouldDismiss {
+                        let separatorImageView = UIImageView(frame: CGRect(x: 0, y: CGRectGetHeight(textLabel!.frame), width: CGRectGetWidth(view.frame), height: MJAV_Height_Separator))
+                        separatorImageView.backgroundColor = UIColor.colorWithHex(hex: 0xF94137)
+                        view.addSubview(separatorImageView)
+                        
+                        let cancelButton = UIButton(type: UIButtonType.Custom)
+                        cancelButton.frame = CGRect(x: 0, y: CGRectGetMaxY(separatorImageView.frame), width: CGRectGetWidth(view.frame), height: MJAV_Height_Cancel_Button)
+//                        cancelButton.setNormalTitleColor(UIColor.whiteColor())
+                        cancelButton.backgroundColor = UIColor.colorWithHex(hex: 0x000000)
+                        cancelButton.addTarget(self, action: #selector(UIView.buttonCancelClicked(_:)), forControlEvents: UIControlEvents.TouchUpInside)
+                        cancelButton.titleLabel?.font = MJAV_NOTIFIER_CANCEL_FONT
+                        view.addSubview(cancelButton)
+                    }
+                    
+                    UIView.animateWithDuration(0.4, delay: 0, options: UIViewAnimationOptions.CurveEaseOut, animations: { 
+                        view.alpha = 1
+                        view.frame = finalFrame
+                    }, completion: nil)
+                })
+                
+                if shouldDismiss {
+                    performSelector(#selector(UIView.dismissMJNotifier), withObject: nil, afterDelay: 2.0)
+                }
+            } else {
+                let notifierView = UIView(frame: CGRect(x: xOffset, y: CGRectGetHeight(screenBounds), width: notifierWidth, height: notifierHeight))
+//                notifierView.backgroundColor = UIColor.colorWithHex(hex: 0xF94137)
+                notifierView.backgroundColor = type.backgroundColor
+                notifierView.tag = MJAV_Tag
+                notifierView.clipsToBounds = true
+                notifierView.layer.cornerRadius = 5
+                
+                MJAV_APPDELEGATE?.window??.addSubview(notifierView)
+                MJAV_APPDELEGATE?.window??.bringSubviewToFront(notifierView)
+                
+                let textLabel = UILabel(frame: CGRect(x: MJAV_xPadding, y: 0, width: notifierWidth - MJAV_xPadding.double, height: MJAV_Height_Label))
+                textLabel.adjustsFontSizeToFitWidth = true
+                textLabel.backgroundColor = UIColor.clearColor()
+                textLabel.textAlignment = .Center
+//                textLabel.textColor = UIColor.colorWithHex(hex: 0xFFFFFF)
+                textLabel.textColor = type.textColor
+                textLabel.font = MJAV_NOTIFIER_LABEL_FONT
+                textLabel.minimumScaleFactor = 0.7
+                textLabel.text = text
+                notifierView.addSubview(textLabel)
+                
+                if shouldDismiss {
+                    self.performSelector(#selector(UIView.dismissMJNotifier), withObject: nil, afterDelay: 2)
+//                } else {
+//                    let separatorImageView = UIImageView(frame: CGRect(x: 0, y: CGRectGetHeight(textLabel.frame), width: CGRectGetWidth(notifierView.frame), height: MJAV_Height_Separator))
+//                    separatorImageView.backgroundColor = UIColor.colorWithHex(hex: 0xF94137)
+//                    notifierView.addSubview(separatorImageView)
+//                    
+//                    let cancelButton = UIButton(type: UIButtonType.Custom)
+//                    cancelButton.frame = CGRect(x: 0, y: CGRectGetMaxY(separatorImageView.frame), width: CGRectGetWidth(notifierView.frame), height: MJAV_Height_Cancel_Button)
+//                    cancelButton.backgroundColor = UIColor.colorWithHex(hex: 0x000000)
+//                    cancelButton.addTarget(self, action: #selector(UIView.buttonCancelClicked(_:)), forControlEvents: UIControlEvents.TouchUpInside)
+//                    cancelButton.titleLabel?.font = MJAV_NOTIFIER_CANCEL_FONT
+//                    notifierView.addSubview(cancelButton)
+                }
+                
+                self.startEntryAnimation(notifierView, withFinalFrame: finalFrame)
+            }
+        }
+    }
+    class func dismissMJNotifier() {
+        NSObject.cancelPreviousPerformRequestsWithTarget(self, selector: #selector(UIView.dismissMJNotifier), object: nil)
+        
+        var notifier : UIView?
+        
+        for subview in MJAV_APPDELEGATE!.window!!.subviews {
+            if subview.tag == MJAV_Tag && subview.isKindOfClass(UIView.self) {
+                notifier = subview
+            }
+        }
+        
+        startExitAnimation(notifier)
+    }
+}
+
+private extension UIView {
+    class func isNotifierExistedAlready() -> UIView? {
+        NSObject.cancelPreviousPerformRequestsWithTarget(self, selector: #selector(UIView.dismissMJNotifier), object: nil)
+        
+        var notifier : UIView?
+        
+        for subview in MJAV_APPDELEGATE!.window!!.subviews {
+            if subview.tag == MJAV_Tag && subview.isKindOfClass(UIView.self) {
+                notifier = subview
+            }
+        }
+        
+        return notifier
+    }
+    
+    @objc class func buttonCancelClicked(sender : UIButton) {
+        dismissMJNotifier()
+    }
+    
+    class func updateNotifierWithAnimation(notifierView : UIView?, andText text : String, andCompletion completion : ((finished : Bool) -> Void)?) {
+        if let view = notifierView {
+            var finalFrame = view.frame
+            finalFrame.origin.y = finalFrame.origin.y + 8
+            
+            UIView.animateWithDuration( 0.2,
+                                        delay: 0,
+                                        options: UIViewAnimationOptions.CurveEaseOut,
+                                        animations: {
+                                            view.alpha = 0
+                                            view.frame = finalFrame
+                                        },
+                                        completion: { (finished : Bool) in
+                                            completion?(finished: finished)
+                                        }
+                                    )
+        }
+    }
+    
+    class func startEntryAnimation(notifierView : UIView?, withFinalFrame finalFrame : CGRect) {
+        
+        if let view = notifierView {
+            
+            var mutableFinalFrame = finalFrame
+            
+            let finalYOffset = mutableFinalFrame.origin.y
+            mutableFinalFrame.origin.y = finalFrame.origin.y - 15
+            
+            let transform = transformWithXAxisValue(-0.1, andAngle: 45)
+            view.layer.zPosition = 400
+            view.layer.transform = transform
+            
+            UIView.animateWithDuration(0.2, delay: 0, options: UIViewAnimationOptions.CurveEaseOut, animations: {
+                
+                view.frame = mutableFinalFrame
+                
+                let anotherTransform = transformWithXAxisValue(0.1, andAngle: 15)
+                view.layer.zPosition = 400
+                view.layer.transform = anotherTransform
+                
+            }, completion: { (finished : Bool) in
+                UIView.animateWithDuration(0.4, delay: 0, options: UIViewAnimationOptions.CurveEaseIn, animations: {
+                    
+                    var atLastFrame = mutableFinalFrame
+                    atLastFrame.origin.y = finalYOffset
+                    view.frame = atLastFrame
+                    
+                    let transform = self.transformWithXAxisValue(0.0, andAngle: 90)
+                    view.layer.zPosition = 400
+                    view.layer.transform = transform
+                    
+                }, completion: nil)
+            })
+        }
+        
+    }
+    
+    class func startExitAnimation(notifierView : UIView?) {
+        
+        if let view = notifierView {
+        
+            let screenBounds = MJAV_APPDELEGATE!.window!!.bounds
+            
+            var notifierFrame = view.frame
+            let finalYOffset = notifierFrame.origin.y - 12
+            notifierFrame.origin.y = finalYOffset
+            
+            UIView.animateWithDuration(0.3, delay: 0, options: UIViewAnimationOptions.CurveEaseOut, animations: { 
+                view.frame = notifierFrame
+                let transform = transformWithXAxisValue(0.1, andAngle: 30)
+                view.layer.zPosition = 400
+                view.layer.transform = transform
+            }, completion: { (finished : Bool) in
+                UIView.animateWithDuration(0.15, delay: 0, options: UIViewAnimationOptions.CurveEaseIn, animations: { 
+                    var atLastFrame = view.frame
+                    atLastFrame.origin.y = CGRectGetHeight(screenBounds)
+                    view.frame = atLastFrame
+                    
+                    let transform = transformWithXAxisValue(-1, andAngle: 90)
+                    view.layer.zPosition = 400
+                    view.layer.transform = transform
+                }, completion: { (finished : Bool) in
+                    view.removeFromSuperview()
+                })
+            })
+        }
+    }
+    
+    class func transformWithXAxisValue(xValue : CGFloat, andAngle angle : CGFloat) -> CATransform3D {
+        var transform = CATransform3DIdentity
+        
+        transform.m34 = 1.0 / -1000
+        
+        transform = CATransform3DRotate(transform, angle * M_PI.toCGFloat / 180, xValue, 0, 0)
+        
+        return transform
+    }
+}
\ No newline at end of file
diff --git a/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift.xcodeproj/project.pbxproj b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..c3ce169
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift.xcodeproj/project.pbxproj
@@ -0,0 +1,321 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		A169EFB81D38DBC600431D02 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A169EFB71D38DBC600431D02 /* AppDelegate.swift */; };
+		A169EFBA1D38DBC600431D02 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A169EFB91D38DBC600431D02 /* ViewController.swift */; };
+		A169EFBD1D38DBC600431D02 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A169EFBB1D38DBC600431D02 /* Main.storyboard */; };
+		A169EFBF1D38DBC600431D02 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A169EFBE1D38DBC600431D02 /* Assets.xcassets */; };
+		A169EFC21D38DBC600431D02 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A169EFC01D38DBC600431D02 /* LaunchScreen.storyboard */; };
+		A169EFCB1D38DBF300431D02 /* UIViewExtension-MJAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A169EFCA1D38DBF300431D02 /* UIViewExtension-MJAlertView.swift */; };
+		A169EFCD1D38DC2100431D02 /* UIColorExtension-Instance.swift in Sources */ = {isa = PBXBuildFile; fileRef = A169EFCC1D38DC2100431D02 /* UIColorExtension-Instance.swift */; };
+		A169EFCF1D38DC3400431D02 /* NumberExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A169EFCE1D38DC3400431D02 /* NumberExtension.swift */; };
+		A169EFD11D38DC5300431D02 /* StringExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A169EFD01D38DC5300431D02 /* StringExtension.swift */; };
+		A169EFD31D38DC6500431D02 /* CGFloatExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A169EFD21D38DC6500431D02 /* CGFloatExtension.swift */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		A169EFB41D38DBC600431D02 /* MJAlertViewDemo-Swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "MJAlertViewDemo-Swift.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+		A169EFB71D38DBC600431D02 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
+		A169EFB91D38DBC600431D02 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
+		A169EFBC1D38DBC600431D02 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
+		A169EFBE1D38DBC600431D02 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
+		A169EFC11D38DBC600431D02 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
+		A169EFC31D38DBC600431D02 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+		A169EFCA1D38DBF300431D02 /* UIViewExtension-MJAlertView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIViewExtension-MJAlertView.swift"; sourceTree = "<group>"; };
+		A169EFCC1D38DC2100431D02 /* UIColorExtension-Instance.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColorExtension-Instance.swift"; sourceTree = "<group>"; };
+		A169EFCE1D38DC3400431D02 /* NumberExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NumberExtension.swift; sourceTree = "<group>"; };
+		A169EFD01D38DC5300431D02 /* StringExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringExtension.swift; sourceTree = "<group>"; };
+		A169EFD21D38DC6500431D02 /* CGFloatExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CGFloatExtension.swift; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		A169EFB11D38DBC600431D02 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		A169EFAB1D38DBC600431D02 = {
+			isa = PBXGroup;
+			children = (
+				A169EFB61D38DBC600431D02 /* MJAlertViewDemo-Swift */,
+				A169EFB51D38DBC600431D02 /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		A169EFB51D38DBC600431D02 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				A169EFB41D38DBC600431D02 /* MJAlertViewDemo-Swift.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		A169EFB61D38DBC600431D02 /* MJAlertViewDemo-Swift */ = {
+			isa = PBXGroup;
+			children = (
+				A169EFC91D38DBF300431D02 /* MJAlertView-Swift */,
+				A169EFB71D38DBC600431D02 /* AppDelegate.swift */,
+				A169EFB91D38DBC600431D02 /* ViewController.swift */,
+				A169EFBB1D38DBC600431D02 /* Main.storyboard */,
+				A169EFBE1D38DBC600431D02 /* Assets.xcassets */,
+				A169EFC01D38DBC600431D02 /* LaunchScreen.storyboard */,
+				A169EFC31D38DBC600431D02 /* Info.plist */,
+			);
+			path = "MJAlertViewDemo-Swift";
+			sourceTree = "<group>";
+		};
+		A169EFC91D38DBF300431D02 /* MJAlertView-Swift */ = {
+			isa = PBXGroup;
+			children = (
+				A169EFD21D38DC6500431D02 /* CGFloatExtension.swift */,
+				A169EFD01D38DC5300431D02 /* StringExtension.swift */,
+				A169EFCE1D38DC3400431D02 /* NumberExtension.swift */,
+				A169EFCC1D38DC2100431D02 /* UIColorExtension-Instance.swift */,
+				A169EFCA1D38DBF300431D02 /* UIViewExtension-MJAlertView.swift */,
+			);
+			path = "MJAlertView-Swift";
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		A169EFB31D38DBC600431D02 /* MJAlertViewDemo-Swift */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = A169EFC61D38DBC600431D02 /* Build configuration list for PBXNativeTarget "MJAlertViewDemo-Swift" */;
+			buildPhases = (
+				A169EFB01D38DBC600431D02 /* Sources */,
+				A169EFB11D38DBC600431D02 /* Frameworks */,
+				A169EFB21D38DBC600431D02 /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = "MJAlertViewDemo-Swift";
+			productName = "MJAlertViewDemo-Swift";
+			productReference = A169EFB41D38DBC600431D02 /* MJAlertViewDemo-Swift.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		A169EFAC1D38DBC600431D02 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastSwiftUpdateCheck = 0730;
+				LastUpgradeCheck = 0730;
+				ORGANIZATIONNAME = Jason;
+				TargetAttributes = {
+					A169EFB31D38DBC600431D02 = {
+						CreatedOnToolsVersion = 7.3.1;
+					};
+				};
+			};
+			buildConfigurationList = A169EFAF1D38DBC600431D02 /* Build configuration list for PBXProject "MJAlertViewDemo-Swift" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = A169EFAB1D38DBC600431D02;
+			productRefGroup = A169EFB51D38DBC600431D02 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				A169EFB31D38DBC600431D02 /* MJAlertViewDemo-Swift */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		A169EFB21D38DBC600431D02 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				A169EFC21D38DBC600431D02 /* LaunchScreen.storyboard in Resources */,
+				A169EFBF1D38DBC600431D02 /* Assets.xcassets in Resources */,
+				A169EFBD1D38DBC600431D02 /* Main.storyboard in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		A169EFB01D38DBC600431D02 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				A169EFBA1D38DBC600431D02 /* ViewController.swift in Sources */,
+				A169EFB81D38DBC600431D02 /* AppDelegate.swift in Sources */,
+				A169EFD11D38DC5300431D02 /* StringExtension.swift in Sources */,
+				A169EFD31D38DC6500431D02 /* CGFloatExtension.swift in Sources */,
+				A169EFCD1D38DC2100431D02 /* UIColorExtension-Instance.swift in Sources */,
+				A169EFCB1D38DBF300431D02 /* UIViewExtension-MJAlertView.swift in Sources */,
+				A169EFCF1D38DC3400431D02 /* NumberExtension.swift in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		A169EFBB1D38DBC600431D02 /* Main.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				A169EFBC1D38DBC600431D02 /* Base */,
+			);
+			name = Main.storyboard;
+			sourceTree = "<group>";
+		};
+		A169EFC01D38DBC600431D02 /* LaunchScreen.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				A169EFC11D38DBC600431D02 /* Base */,
+			);
+			name = LaunchScreen.storyboard;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		A169EFC41D38DBC600431D02 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_TESTABILITY = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 9.3;
+				MTL_ENABLE_DEBUG_INFO = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = iphoneos;
+				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+			};
+			name = Debug;
+		};
+		A169EFC51D38DBC600431D02 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 9.3;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				SDKROOT = iphoneos;
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		A169EFC71D38DBC600431D02 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				INFOPLIST_FILE = "MJAlertViewDemo-Swift/Info.plist";
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = "com.WeSwift.MJAlertViewDemo-Swift";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Debug;
+		};
+		A169EFC81D38DBC600431D02 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				INFOPLIST_FILE = "MJAlertViewDemo-Swift/Info.plist";
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = "com.WeSwift.MJAlertViewDemo-Swift";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		A169EFAF1D38DBC600431D02 /* Build configuration list for PBXProject "MJAlertViewDemo-Swift" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				A169EFC41D38DBC600431D02 /* Debug */,
+				A169EFC51D38DBC600431D02 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		A169EFC61D38DBC600431D02 /* Build configuration list for PBXNativeTarget "MJAlertViewDemo-Swift" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				A169EFC71D38DBC600431D02 /* Debug */,
+				A169EFC81D38DBC600431D02 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = A169EFAC1D38DBC600431D02 /* Project object */;
+}
diff --git a/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..6d830fb
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:MJAlertViewDemo-Swift.xcodeproj">
+   </FileRef>
+</Workspace>
diff --git a/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift.xcodeproj/project.xcworkspace/xcuserdata/JasonLee.xcuserdatad/UserInterfaceState.xcuserstate b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift.xcodeproj/project.xcworkspace/xcuserdata/JasonLee.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644
index 0000000000000000000000000000000000000000..7bfc0f18999a244a2f0983b63ab0029a2ef84cbb
GIT binary patch
diff --git a/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift.xcodeproj/xcuserdata/JasonLee.xcuserdatad/xcschemes/MJAlertViewDemo-Swift.xcscheme b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift.xcodeproj/xcuserdata/JasonLee.xcuserdatad/xcschemes/MJAlertViewDemo-Swift.xcscheme
new file mode 100644
index 0000000..46cb875
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift.xcodeproj/xcuserdata/JasonLee.xcuserdatad/xcschemes/MJAlertViewDemo-Swift.xcscheme
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "0730"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "A169EFB31D38DBC600431D02"
+               BuildableName = "MJAlertViewDemo-Swift.app"
+               BlueprintName = "MJAlertViewDemo-Swift"
+               ReferencedContainer = "container:MJAlertViewDemo-Swift.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <Testables>
+      </Testables>
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "A169EFB31D38DBC600431D02"
+            BuildableName = "MJAlertViewDemo-Swift.app"
+            BlueprintName = "MJAlertViewDemo-Swift"
+            ReferencedContainer = "container:MJAlertViewDemo-Swift.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "A169EFB31D38DBC600431D02"
+            BuildableName = "MJAlertViewDemo-Swift.app"
+            BlueprintName = "MJAlertViewDemo-Swift"
+            ReferencedContainer = "container:MJAlertViewDemo-Swift.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Release"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "A169EFB31D38DBC600431D02"
+            BuildableName = "MJAlertViewDemo-Swift.app"
+            BlueprintName = "MJAlertViewDemo-Swift"
+            ReferencedContainer = "container:MJAlertViewDemo-Swift.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>
diff --git a/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift.xcodeproj/xcuserdata/JasonLee.xcuserdatad/xcschemes/xcschememanagement.plist b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift.xcodeproj/xcuserdata/JasonLee.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 0000000..031e5bc
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift.xcodeproj/xcuserdata/JasonLee.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>SchemeUserState</key>
+	<dict>
+		<key>MJAlertViewDemo-Swift.xcscheme</key>
+		<dict>
+			<key>orderHint</key>
+			<integer>0</integer>
+		</dict>
+	</dict>
+	<key>SuppressBuildableAutocreation</key>
+	<dict>
+		<key>A169EFB31D38DBC600431D02</key>
+		<dict>
+			<key>primary</key>
+			<true/>
+		</dict>
+	</dict>
+</dict>
+</plist>
diff --git a/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/AppDelegate.swift b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/AppDelegate.swift
new file mode 100644
index 0000000..efc3c0e
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/AppDelegate.swift
@@ -0,0 +1,46 @@
+//
+//  AppDelegate.swift
+//  MJAlertViewDemo-Swift
+//
+//  Created by Jason.Chengzi on 7/15/16.
+//  Copyright © 2016 Jason. All rights reserved.
+//
+
+import UIKit
+
+@UIApplicationMain
+class AppDelegate: UIResponder, UIApplicationDelegate {
+
+    var window: UIWindow?
+
+
+    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
+        // Override point for customization after application launch.
+        return true
+    }
+
+    func applicationWillResignActive(application: UIApplication) {
+        // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+        // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+    }
+
+    func applicationDidEnterBackground(application: UIApplication) {
+        // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+        // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+    }
+
+    func applicationWillEnterForeground(application: UIApplication) {
+        // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+    }
+
+    func applicationDidBecomeActive(application: UIApplication) {
+        // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+    }
+
+    func applicationWillTerminate(application: UIApplication) {
+        // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+    }
+
+
+}
+
diff --git a/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/Assets.xcassets/AppIcon.appiconset/Contents.json b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..118c98f
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,38 @@
+{
+  "images" : [
+    {
+      "idiom" : "iphone",
+      "size" : "29x29",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "29x29",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "40x40",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "40x40",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "60x60",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "60x60",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/Base.lproj/LaunchScreen.storyboard b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 0000000..2e721e1
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
+    <dependencies>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/>
+    </dependencies>
+    <scenes>
+        <!--View Controller-->
+        <scene sceneID="EHf-IW-A2E">
+            <objects>
+                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
+                        <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
+                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <animations/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="53" y="375"/>
+        </scene>
+    </scenes>
+</document>
diff --git a/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/Base.lproj/Main.storyboard b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/Base.lproj/Main.storyboard
new file mode 100644
index 0000000..5362dd6
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/Base.lproj/Main.storyboard
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
+    </dependencies>
+    <scenes>
+        <!--View Controller-->
+        <scene sceneID="tne-QT-ifu">
+            <objects>
+                <viewController id="BYZ-38-t0r" customClass="ViewController" customModule="MJAlertViewDemo_Swift" customModuleProvider="target" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
+                        <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
+                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sex-wv-ioF">
+                                <rect key="frame" x="250" y="68" width="100" height="30"/>
+                                <state key="normal" title="Show Success"/>
+                                <connections>
+                                    <action selector="showSuccess:" destination="BYZ-38-t0r" eventType="touchUpInside" id="6yU-6w-xnt"/>
+                                </connections>
+                            </button>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tpK-L1-0s9">
+                                <rect key="frame" x="262" y="155" width="76" height="30"/>
+                                <state key="normal" title="Show Error"/>
+                                <connections>
+                                    <action selector="showError:" destination="BYZ-38-t0r" eventType="touchUpInside" id="wDb-QO-zna"/>
+                                </connections>
+                            </button>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Nsg-Dw-vNE">
+                                <rect key="frame" x="261" y="238" width="78" height="30"/>
+                                <state key="normal" title="Show Warn"/>
+                                <connections>
+                                    <action selector="showWarn:" destination="BYZ-38-t0r" eventType="touchUpInside" id="JGL-VV-cqH"/>
+                                </connections>
+                            </button>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aVO-mV-Y4p">
+                                <rect key="frame" x="266" y="326" width="68" height="30"/>
+                                <state key="normal" title="Show Info"/>
+                                <connections>
+                                    <action selector="showInfo:" destination="BYZ-38-t0r" eventType="touchUpInside" id="RVb-nG-FMp"/>
+                                </connections>
+                            </button>
+                        </subviews>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+                        <constraints>
+                            <constraint firstItem="tpK-L1-0s9" firstAttribute="centerX" secondItem="sex-wv-ioF" secondAttribute="centerX" id="DcY-S1-317"/>
+                            <constraint firstItem="Nsg-Dw-vNE" firstAttribute="top" secondItem="tpK-L1-0s9" secondAttribute="bottom" constant="53" id="Y05-Bc-kxQ"/>
+                            <constraint firstItem="sex-wv-ioF" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" constant="48" id="ZJh-oI-zv6"/>
+                            <constraint firstItem="Nsg-Dw-vNE" firstAttribute="centerX" secondItem="tpK-L1-0s9" secondAttribute="centerX" id="cmR-o6-WIg"/>
+                            <constraint firstItem="aVO-mV-Y4p" firstAttribute="top" secondItem="Nsg-Dw-vNE" secondAttribute="bottom" constant="58" id="mxz-Wc-wHN"/>
+                            <constraint firstItem="sex-wv-ioF" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="r1n-Xq-VRf"/>
+                            <constraint firstItem="aVO-mV-Y4p" firstAttribute="centerX" secondItem="Nsg-Dw-vNE" secondAttribute="centerX" id="sNY-Dw-VAH"/>
+                            <constraint firstItem="tpK-L1-0s9" firstAttribute="top" secondItem="sex-wv-ioF" secondAttribute="bottom" constant="57" id="u2i-QN-AR9"/>
+                        </constraints>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
+            </objects>
+        </scene>
+    </scenes>
+</document>
diff --git a/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/Info.plist b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/Info.plist
new file mode 100644
index 0000000..6905cc6
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/Info.plist
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>en</string>
+	<key>CFBundleExecutable</key>
+	<string>$(EXECUTABLE_NAME)</string>
+	<key>CFBundleIdentifier</key>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>$(PRODUCT_NAME)</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
+	<key>UILaunchStoryboardName</key>
+	<string>LaunchScreen</string>
+	<key>UIMainStoryboardFile</key>
+	<string>Main</string>
+	<key>UIRequiredDeviceCapabilities</key>
+	<array>
+		<string>armv7</string>
+	</array>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+</dict>
+</plist>
diff --git a/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/CGFloatExtension.swift b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/CGFloatExtension.swift
new file mode 100644
index 0000000..1e11718
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/CGFloatExtension.swift
@@ -0,0 +1,43 @@
+//
+//  CGFloatExtension.swift
+//  ChildrenGuardian
+//
+//  Created by Jason.Chengzi on 16/06/17.
+//  Copyright © 2016年 Hvit. All rights reserved.
+//
+
+import UIKit
+
+extension CGFloat {
+    ///转换为Float
+    var toFloat     : Float     { return Float(self)            }
+    ///转换为Int
+    var toInt       : Int       { return Int(self)              }
+    ///转换为Double
+    var toDouble    : Double    { return Double(self)           }
+    
+    ///一半数值
+    var half        : CGFloat   { return self / 2               }
+    ///相反数值
+    var opposite    : CGFloat   { return -self                  }
+    ///绝对值
+    var absolute    : CGFloat   { return abs(self)              }
+    ///两倍数值
+    var double      : CGFloat   { return self * 2               }
+    ///三倍数值
+    var triple      : CGFloat   { return self * 3               }
+    ///平方数
+    var square      : CGFloat   { return (self * self)          }
+    ///立方数
+    var cube        : CGFloat   { return (self * self * self)   }
+    
+    static func MIN(lbs lbs : CGFloat, rbs : CGFloat) -> CGFloat {
+        if lbs > rbs {
+            return rbs
+        } else if lbs < rbs {
+            return lbs
+        } else {
+            return lbs
+        }
+    }
+}
\ No newline at end of file
diff --git a/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/NumberExtension.swift b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/NumberExtension.swift
new file mode 100644
index 0000000..9a8078b
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/NumberExtension.swift
@@ -0,0 +1,125 @@
+//
+//  NumberExtension.swift
+//  HealthPlus
+//
+//  Created by Jason.Chengzi on 16/05/20.
+//  Copyright © 2016年 Hvit. All rights reserved.
+//
+import UIKit
+
+extension Int {
+    ///转换为CGFloat
+    var toCGFloat   : CGFloat   { return CGFloat(self)          }
+    ///转换为Float
+    var toFloat     : Float     { return Float(self)            }
+    ///转换为Double
+    var toDouble    : Double    { return Double(self)           }
+    
+    ///一半数值
+    var half        : Int       { return self / 2               }
+    ///相反数值
+    var opposite    : Int       { return -self                  }
+    ///绝对值
+    var absolute    : Int       { return abs(self)              }
+    ///两倍数值
+    var double      : Int       { return self * 2               }
+    ///三倍数值
+    var triple      : Int       { return self * 3               }
+    ///平方数
+    var square      : Int       { return (self * self)          }
+    ///立方数
+    var cube        : Int       { return (self * self * self)   }
+    
+    ///是否在开区间内
+    func isGreaterThan(min : Int, lessThan max : Int) -> Bool {
+        if self > min && self < max {
+            return true
+        }
+        return false
+    }
+    ///是否在闭区间内
+    func isEqualAndGreaterThan(min : Int, equalAndLessThan max : Int) -> Bool {
+        if self >= min && self <= max {
+            return true
+        }
+        return false
+    }
+}
+
+extension Float {
+    ///转换为CGFloat
+    var toCGFloat   : CGFloat   { return CGFloat(self)          }
+    ///转换为Int
+    var toInt       : Int       { return Int(self)              }
+    ///转换为Double
+    var toDouble    : Double    { return Double(self)           }
+    
+    ///一半数值
+    var half        : Float     { return self / 2               }
+    ///相反数值
+    var opposite    : Float     { return -self                  }
+    ///绝对值
+    var absolute    : Float     { return abs(self)              }
+    ///两倍数值
+    var double      : Float     { return self * 2               }
+    ///三倍数值
+    var triple      : Float     { return self * 3               }
+    ///平方数
+    var square      : Float     { return (self * self)          }
+    ///立方数
+    var cube        : Float     { return (self * self * self)   }
+    
+    ///是否在开区间内
+    func isGreaterThan(min : Float, lessThan max : Float) -> Bool {
+        if self > min && self < max {
+            return true
+        }
+        return false
+    }
+    ///是否在闭区间内
+    func isEqualAndGreaterThan(min : Float, equalAndLessThan max : Float) -> Bool {
+        if self >= min && self <= max {
+            return true
+        }
+        return false
+    }
+}
+
+extension Double {
+    ///转换为CGFloat
+    var toCGFloat   : CGFloat   { return CGFloat(self)          }
+    ///转换为Float
+    var toFloat     : Float     { return Float(self)            }
+    ///转换为Int
+    var toInt       : Int       { return Int(self)              }
+    
+    ///一半数值
+    var half        : Double    { return self / 2               }
+    ///相反数值
+    var opposite    : Double    { return -self                  }
+    ///绝对值
+    var absolute    : Double    { return abs(self)              }
+    ///两倍数值
+    var double      : Double    { return self * 2               }
+    ///三倍数值
+    var triple      : Double    { return self * 3               }
+    ///平方数
+    var square      : Double    { return (self * self)          }
+    ///立方数
+    var cube        : Double    { return (self * self * self)   }
+    
+    ///是否在开区间内
+    func isGreaterThan(min : Double, lessThan max : Double) -> Bool {
+        if self > min && self < max {
+            return true
+        }
+        return false
+    }
+    ///是否在闭区间内
+    func isEqualAndGreaterThan(min : Double, equalAndLessThan max : Double) -> Bool {
+        if self >= min && self <= max {
+            return true
+        }
+        return false
+    }
+}
\ No newline at end of file
diff --git a/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/StringExtension.swift b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/StringExtension.swift
new file mode 100644
index 0000000..96d3159
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/StringExtension.swift
@@ -0,0 +1,131 @@
+//
+//  StringExtension.swift
+//  HealthPlus
+//
+//  Created by Jason.Chengzi on 16/05/17.
+//  Copyright © 2016年 Hvit. All rights reserved.
+//
+import UIKit
+
+extension String {
+    ///获取NSString对象
+    var toNSString : NSString {
+        return NSString(string: self)
+    }
+    ///获取字符串长度
+    var length : Int {
+        return self.characters.count
+    }
+    
+    ///判断是否为整数
+    var isInt : Bool {
+        if Int(self) != nil {
+            return true
+        } else {
+            return false
+        }
+    }
+    ///判断是否为浮点数
+    var isFloat : Bool {
+        if Float(self) != nil {
+            return true
+        } else {
+            return false
+        }
+    }
+    ///判断是否为长浮点数
+    var isDouble : Bool {
+        if Double(self) != nil {
+            return true
+        } else {
+            return false
+        }
+    }
+    
+    ///尝试转换为整型
+    var nullableInt : Int? {
+        return Int(self)
+    }
+    ///尝试转换为浮点数
+    var nullableFloat : Float? {
+        return Float(self)
+    }
+    ///尝试转换为长浮点数
+    var nullableDouble : Double? {
+        return Double(self)
+    }
+    
+    ///强制转换为整型，失败返回0
+    var toInt : Int {
+        return Int(self) ?? 0
+    }
+    ///强制转换为浮点数，失败返回0
+    var toFloat : Float {
+        return Float(self) ?? Float(0)
+    }
+    ///强制转换为长浮点数，失败返回0
+    var toDouble : Double {
+        return Double(self) ?? Double(0)
+    }
+    
+    ///获取第一个字母
+    var firstLetter : String {
+        var ret = ""
+        if !self.canBeConvertedToEncoding(NSASCIIStringEncoding) {
+            ret = self.letters.firstLetter
+        } else {
+            ret = "\("\(self.characters.first)" ?? "")"
+        }
+        return ret
+    }
+    
+    var letters : String {
+        let str = NSMutableString(string: self)
+        if CFStringTransform(str, nil, kCFStringTransformMandarinLatin, false) {
+            if CFStringTransform(str, nil, kCFStringTransformStripDiacritics, false) {
+                return str as String
+            }
+        }
+        return self
+    }
+
+    func getFirstLetter() -> String {
+        return self.firstLetter
+    }
+    
+    ///通过字体获取字符串的尺寸
+    func sizeWithFont(font : UIFont) -> CGSize {
+        //如果没有内容
+        guard self.isEmpty == false else {
+            return CGSizeZero
+        }
+        return self.toNSString.sizeWithAttributes([NSFontAttributeName : font])
+    }
+    ///通过字体和固定宽度计算字符串的高度
+    func heightWithWidth(width : CGFloat, font : UIFont) -> CGFloat {
+        //如果没有内容
+        guard self.isEmpty == false else {
+            return CGFloat(0)
+        }
+        return self.sizeWithFont(font).width / width
+    }
+    ///截取指定长度的字符串
+    func substringWithStartPosition(start : Int, andEndPosition end : Int) -> String {
+        return self.substringWithRange(self.startIndex.advancedBy(start)..<self.startIndex.advancedBy(end))
+    }
+    ///判断是否满足正则表达式
+    func isMatchingPattern(pattern : MCPattern) -> Bool {
+        let regex : NSRegularExpression? = try? NSRegularExpression(pattern: pattern.pattern, options: NSRegularExpressionOptions.CaseInsensitive)
+        if let matches = regex?.matchesInString(self, options: [], range: NSMakeRange(0, self.toNSString.length)) {
+            return matches.count > 0
+        } else {
+            return false
+        }
+    }
+    
+    
+}
+
+struct MCPattern {
+    var pattern : String
+}
\ No newline at end of file
diff --git a/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/UIColorExtension-Instance.swift b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/UIColorExtension-Instance.swift
new file mode 100644
index 0000000..dbb028c
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/UIColorExtension-Instance.swift
@@ -0,0 +1,135 @@
+//
+//  UIColorExtension.swift
+//  HealthPlus
+//
+//  Created by Jason.Chengzi on 16/05/13.
+//  Copyright © 2016年 Hvit. All rights reserved.
+//
+import UIKit
+
+//MARK: - UIColor
+extension UIColor {
+    
+    ///CGFloat类型的RGB值
+    var components : (red : CGFloat, green : CGFloat, blue : CGFloat, alpha : CGFloat) {
+        var fRed    : CGFloat = 0
+        var fGreen  : CGFloat = 0
+        var fBlue   : CGFloat = 0
+        var fAlpha  : CGFloat = 0
+        
+        self.getRed(&fRed, green: &fGreen, blue: &fBlue, alpha: &fAlpha)
+        
+        return (fRed, fGreen, fBlue, fAlpha)
+    }
+    ///Int类型的RGB值
+    var RGBValues : (red : Int, green : Int, blue : Int, alpha : CGFloat) {
+        let components = self.components
+        return ((components.red * 255).toInt, (components.green * 255).toInt, (components.blue * 255).toInt, components.alpha)
+    }
+    
+    var redComponent    : CGFloat {
+        return self.components.red
+    }
+    var greenComponent  : CGFloat {
+        return self.components.green
+    }
+    var blueComponent   : CGFloat {
+        return self.components.blue
+    }
+    var alphaComponent  : CGFloat {
+        return self.components.alpha
+    }
+    
+    var coreImageColor : CoreImage.CIColor? {
+        return CoreImage.CIColor(color: self)
+    }
+    
+    var isLight : Bool {
+        var white : CGFloat = 0
+        self.getWhite(&white, alpha: nil)
+        
+        if white >= 0.5 {
+            return true
+        } else {
+            return false
+        }
+    }
+    
+    ///便捷颜色。色相、饱和度、亮度、通透度
+    class func colorWithHue(hue : CGFloat, saturation : CGFloat, brightness : CGFloat, andAlpha alpha : CGFloat) -> UIColor {
+        return UIColor(
+            hue: hue / 256,
+            saturation: saturation / 256,
+            brightness: brightness / 256,
+            alpha: alpha
+        )
+    }
+    class func colorWithHue(hue : CGFloat, saturation : CGFloat, brightness : CGFloat) -> UIColor {
+        return colorWithHue(hue, saturation: saturation, brightness: brightness, andAlpha: 1)
+    }
+    ///便捷颜色初始化
+    class func colorWithRed(red: CGFloat, green: CGFloat, blue: CGFloat, andAlpha alpha: CGFloat) -> UIColor {
+        return UIColor(
+            red: (red / 255.0),
+            green: (green / 255.0),
+            blue: (blue / 255.0),
+            alpha: alpha
+        )
+    }
+    class func colorWithRed(red: CGFloat, green: CGFloat, blue: CGFloat) -> UIColor {
+        return UIColor.colorWithRed(
+            red,
+            green: green,
+            blue: blue,
+            andAlpha: 1
+        )
+    }
+    ///16进制初始化颜色
+    class func colorWithHex(hex h: Int, andAlpha alpha: CGFloat) -> UIColor {
+        let red = CGFloat(((h & 0xFF0000) >> 16))
+        let green = CGFloat(((h & 0xFF00) >> 8))
+        let blue = CGFloat((h & 0xFF))
+        
+        return UIColor.colorWithRed(
+            red, green:
+            green,
+            blue: blue,
+            andAlpha: alpha
+        )
+    }
+    class func colorWithHex(hex h: Int) -> UIColor {
+        return UIColor.colorWithHex(hex: h, andAlpha: 1)
+    }
+    class func colorWithHex(hex : String, andAlpha alpha : CGFloat) -> UIColor {
+        var cString : String = hex.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()).uppercaseString
+        
+        if cString.hasPrefix("#") {
+            cString = cString.substringFromIndex(cString.startIndex.advancedBy(1))
+        }
+        
+        if cString.characters.count != 6 {
+            return UIColor.grayColor()
+        }
+        
+        var rgbValue : UInt32 = 0
+        NSScanner(string: cString).scanHexInt(&rgbValue)
+        
+        return UIColor(
+            red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0,
+            green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0,
+            blue: CGFloat(rgbValue & 0x0000FF) / 255.0,
+            alpha: alpha
+        )
+    }
+    class func colorWithHex(hex : String) -> UIColor {
+        return UIColor.colorWithHex(hex, andAlpha: 1)
+    }
+    class func randomColor() -> UIColor {
+        return UIColor(
+            hue: (CGFloat(arc4random()) % 256 / 256.0),
+            saturation: (CGFloat(arc4random()) % 128 / 256.0) + 0.5,
+            brightness: (CGFloat(arc4random()) % 128 / 256.0) + 0.5,
+            alpha: 1
+        )
+    }
+}
diff --git a/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/UIViewExtension-MJAlertView.swift b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/UIViewExtension-MJAlertView.swift
new file mode 100644
index 0000000..8d3c3b4
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/MJAlertView-Swift/UIViewExtension-MJAlertView.swift
@@ -0,0 +1,339 @@
+//
+//  UIViewExtension-MJAlertView.swift
+//  ChildrenGuardian
+//
+//  Created by Jason.Chengzi on 7/13/16.
+//  Copyright © 2016 Hvit. All rights reserved.
+//
+
+import UIKit
+import QuartzCore
+
+private let MJAV_APPDELEGATE            = UIApplication.sharedApplication().delegate
+
+private let MJAV_FONT_SIZE_LABEL        = 18.toCGFloat
+private let MJAV_FONT_SIZE_CANCEL       = 13.toCGFloat
+
+private let MJAV_NOTIFIER_LABEL_FONT    = UIFont(name: "HelveticaNeue-Light", size: MJAV_FONT_SIZE_LABEL)
+private let MJAV_NOTIFIER_CANCEL_FONT   = UIFont(name: "HelveticaNeue", size: MJAV_FONT_SIZE_CANCEL)
+
+private let MJAV_Tag                    = 181200
+private let MJAV_xPadding               = 18.0.toCGFloat
+private let MJAV_Height_Label           = 45.0.toCGFloat
+private let MJAV_Height_Cancel_Button   = 30.0.toCGFloat
+private let MJAV_Height_Separator       = 1.0.toCGFloat
+private let MJAV_Height_FromBottom      = 70.0.toCGFloat
+private let MJAV_Width_Max              = 290.0.toCGFloat
+
+enum MJAlertViewStyle {
+    case Success
+    case Error
+    case Warn
+    case Info
+    case SubjectTheme
+    case Default
+    
+    var backgroundColor : UIColor {
+        switch self {
+        case .Success:
+            return UIColor.colorWithHex(hex: 0x2ecc71)
+        case .Error:
+            return UIColor.colorWithHex(hex: 0xc0392b)
+        case .Warn:
+            return UIColor.colorWithHex(hex: 0xe67e22)
+        case .Info:
+            return UIColor.colorWithHex(hex: 0x2980b9)
+        case .SubjectTheme:
+            return UIColor.blackColor().colorWithAlphaComponent(0.8)
+        case .Default:
+            return UIColor.blackColor().colorWithAlphaComponent(0.8)
+        }
+    }
+    
+    var textColor : UIColor {
+        switch self {
+        case .Success:
+            return UIColor.whiteColor()
+        case .Error:
+            return UIColor.whiteColor()
+        case .Warn:
+            return UIColor.whiteColor()
+        case .Info:
+            return UIColor.whiteColor()
+        case .SubjectTheme:
+//            return UIColor.whiteColor()
+            if self.backgroundColor.isLight {
+                return UIColor.blackColor()
+            } else {
+                return UIColor.whiteColor()
+            }
+        case .Default:
+            return UIColor.whiteColor()
+        }
+    }
+}
+
+extension UIView {
+    class func makeSuccessNotificationWithText(text : String) {
+        UIView.makeAlertViewWithText(text, type: .Success)
+    }
+    class func makeWarnNotificationWithText(text : String) {
+        UIView.makeAlertViewWithText(text, type: .Warn)
+    }
+    class func makeErrorNotificationWithText(text : String) {
+        UIView.makeAlertViewWithText(text, type: .Error)
+    }
+    class func makeInfoNotificationWithText(text : String) {
+        UIView.makeAlertViewWithText(text, type: .Info)
+    }
+    class func makeAlertViewWithText(text : String, type : MJAlertViewStyle = .Default) {
+        
+        let shouldDismiss = true
+        
+        if let screenBounds = MJAV_APPDELEGATE?.window!!.bounds {
+            let attributes : [String : AnyObject] = [NSFontAttributeName : MJAV_NOTIFIER_LABEL_FONT ?? UIFont.systemFontOfSize(MJAV_FONT_SIZE_LABEL)]
+            
+            let height = MJAV_Height_Label
+            let width = CGFloat.max
+            let notifierRect = text.toNSString.boundingRectWithSize(
+                                                    CGSize(
+                                                        width: width,
+                                                        height: height
+                                                    ),
+                                                    options: NSStringDrawingOptions.UsesLineFragmentOrigin,
+                                                    attributes: attributes,
+                                                    context: nil
+                                                )
+            let notifierWidth = CGFloat.MIN(lbs: CGRectGetWidth(notifierRect) + MJAV_xPadding.double, rbs: MJAV_Width_Max)
+            let xOffset = (CGRectGetWidth(screenBounds) - notifierWidth).half
+            
+            let notifierHeight = MJAV_Height_Label
+            
+//            if !shouldDismiss {
+//                notifierHeight += (MJAV_Height_Cancel_Button + MJAV_Height_Separator)
+//            }
+            
+            let yOffset = CGRectGetHeight(screenBounds) - notifierHeight - MJAV_Height_FromBottom
+            
+            let finalFrame = CGRect(x: xOffset, y: yOffset, width: notifierWidth, height: notifierHeight)
+            
+            let notifierView = isNotifierExistedAlready()
+            
+            if let view = notifierView {
+                updateNotifierWithAnimation(notifierView, andText: text, andCompletion: { (finished) in
+                    var atLastFrame = finalFrame
+                    atLastFrame.origin.y = finalFrame.origin.y + 8
+                    view.frame = atLastFrame
+                    view.backgroundColor = type.backgroundColor
+                    
+                    var textLabel : UILabel?
+                    for subview in view.subviews {
+                        if subview is UILabel {
+                            textLabel = subview as? UILabel
+                        }
+                        
+                        if subview is UIImageView || subview is UIButton {
+                            subview.removeFromSuperview()
+                        }
+                    }
+                    
+                    textLabel?.text = text
+                    textLabel?.frame = CGRect(x: MJAV_xPadding, y: 0, width: notifierWidth - MJAV_xPadding.double, height: MJAV_Height_Label)
+                    textLabel?.textColor = type.textColor
+                    
+                    if !shouldDismiss {
+                        let separatorImageView = UIImageView(frame: CGRect(x: 0, y: CGRectGetHeight(textLabel!.frame), width: CGRectGetWidth(view.frame), height: MJAV_Height_Separator))
+                        separatorImageView.backgroundColor = UIColor.colorWithHex(hex: 0xF94137)
+                        view.addSubview(separatorImageView)
+                        
+                        let cancelButton = UIButton(type: UIButtonType.Custom)
+                        cancelButton.frame = CGRect(x: 0, y: CGRectGetMaxY(separatorImageView.frame), width: CGRectGetWidth(view.frame), height: MJAV_Height_Cancel_Button)
+//                        cancelButton.setNormalTitleColor(UIColor.whiteColor())
+                        cancelButton.backgroundColor = UIColor.colorWithHex(hex: 0x000000)
+                        cancelButton.addTarget(self, action: #selector(UIView.buttonCancelClicked(_:)), forControlEvents: UIControlEvents.TouchUpInside)
+                        cancelButton.titleLabel?.font = MJAV_NOTIFIER_CANCEL_FONT
+                        view.addSubview(cancelButton)
+                    }
+                    
+                    UIView.animateWithDuration(0.4, delay: 0, options: UIViewAnimationOptions.CurveEaseOut, animations: { 
+                        view.alpha = 1
+                        view.frame = finalFrame
+                    }, completion: nil)
+                })
+                
+                if shouldDismiss {
+                    performSelector(#selector(UIView.dismissMJNotifier), withObject: nil, afterDelay: 2.0)
+                }
+            } else {
+                let notifierView = UIView(frame: CGRect(x: xOffset, y: CGRectGetHeight(screenBounds), width: notifierWidth, height: notifierHeight))
+//                notifierView.backgroundColor = UIColor.colorWithHex(hex: 0xF94137)
+                notifierView.backgroundColor = type.backgroundColor
+                notifierView.tag = MJAV_Tag
+                notifierView.clipsToBounds = true
+                notifierView.layer.cornerRadius = 5
+                
+                MJAV_APPDELEGATE?.window??.addSubview(notifierView)
+                MJAV_APPDELEGATE?.window??.bringSubviewToFront(notifierView)
+                
+                let textLabel = UILabel(frame: CGRect(x: MJAV_xPadding, y: 0, width: notifierWidth - MJAV_xPadding.double, height: MJAV_Height_Label))
+                textLabel.adjustsFontSizeToFitWidth = true
+                textLabel.backgroundColor = UIColor.clearColor()
+                textLabel.textAlignment = .Center
+//                textLabel.textColor = UIColor.colorWithHex(hex: 0xFFFFFF)
+                textLabel.textColor = type.textColor
+                textLabel.font = MJAV_NOTIFIER_LABEL_FONT
+                textLabel.minimumScaleFactor = 0.7
+                textLabel.text = text
+                notifierView.addSubview(textLabel)
+                
+                if shouldDismiss {
+                    self.performSelector(#selector(UIView.dismissMJNotifier), withObject: nil, afterDelay: 2)
+//                } else {
+//                    let separatorImageView = UIImageView(frame: CGRect(x: 0, y: CGRectGetHeight(textLabel.frame), width: CGRectGetWidth(notifierView.frame), height: MJAV_Height_Separator))
+//                    separatorImageView.backgroundColor = UIColor.colorWithHex(hex: 0xF94137)
+//                    notifierView.addSubview(separatorImageView)
+//                    
+//                    let cancelButton = UIButton(type: UIButtonType.Custom)
+//                    cancelButton.frame = CGRect(x: 0, y: CGRectGetMaxY(separatorImageView.frame), width: CGRectGetWidth(notifierView.frame), height: MJAV_Height_Cancel_Button)
+//                    cancelButton.backgroundColor = UIColor.colorWithHex(hex: 0x000000)
+//                    cancelButton.addTarget(self, action: #selector(UIView.buttonCancelClicked(_:)), forControlEvents: UIControlEvents.TouchUpInside)
+//                    cancelButton.titleLabel?.font = MJAV_NOTIFIER_CANCEL_FONT
+//                    notifierView.addSubview(cancelButton)
+                }
+                
+                self.startEntryAnimation(notifierView, withFinalFrame: finalFrame)
+            }
+        }
+    }
+    class func dismissMJNotifier() {
+        NSObject.cancelPreviousPerformRequestsWithTarget(self, selector: #selector(UIView.dismissMJNotifier), object: nil)
+        
+        var notifier : UIView?
+        
+        for subview in MJAV_APPDELEGATE!.window!!.subviews {
+            if subview.tag == MJAV_Tag && subview.isKindOfClass(UIView.self) {
+                notifier = subview
+            }
+        }
+        
+        startExitAnimation(notifier)
+    }
+}
+
+private extension UIView {
+    class func isNotifierExistedAlready() -> UIView? {
+        NSObject.cancelPreviousPerformRequestsWithTarget(self, selector: #selector(UIView.dismissMJNotifier), object: nil)
+        
+        var notifier : UIView?
+        
+        for subview in MJAV_APPDELEGATE!.window!!.subviews {
+            if subview.tag == MJAV_Tag && subview.isKindOfClass(UIView.self) {
+                notifier = subview
+            }
+        }
+        
+        return notifier
+    }
+    
+    @objc class func buttonCancelClicked(sender : UIButton) {
+        dismissMJNotifier()
+    }
+    
+    class func updateNotifierWithAnimation(notifierView : UIView?, andText text : String, andCompletion completion : ((finished : Bool) -> Void)?) {
+        if let view = notifierView {
+            var finalFrame = view.frame
+            finalFrame.origin.y = finalFrame.origin.y + 8
+            
+            UIView.animateWithDuration( 0.2,
+                                        delay: 0,
+                                        options: UIViewAnimationOptions.CurveEaseOut,
+                                        animations: {
+                                            view.alpha = 0
+                                            view.frame = finalFrame
+                                        },
+                                        completion: { (finished : Bool) in
+                                            completion?(finished: finished)
+                                        }
+                                    )
+        }
+    }
+    
+    class func startEntryAnimation(notifierView : UIView?, withFinalFrame finalFrame : CGRect) {
+        
+        if let view = notifierView {
+            
+            var mutableFinalFrame = finalFrame
+            
+            let finalYOffset = mutableFinalFrame.origin.y
+            mutableFinalFrame.origin.y = finalFrame.origin.y - 15
+            
+            let transform = transformWithXAxisValue(-0.1, andAngle: 45)
+            view.layer.zPosition = 400
+            view.layer.transform = transform
+            
+            UIView.animateWithDuration(0.2, delay: 0, options: UIViewAnimationOptions.CurveEaseOut, animations: {
+                
+                view.frame = mutableFinalFrame
+                
+                let anotherTransform = transformWithXAxisValue(0.1, andAngle: 15)
+                view.layer.zPosition = 400
+                view.layer.transform = anotherTransform
+                
+            }, completion: { (finished : Bool) in
+                UIView.animateWithDuration(0.4, delay: 0, options: UIViewAnimationOptions.CurveEaseIn, animations: {
+                    
+                    var atLastFrame = mutableFinalFrame
+                    atLastFrame.origin.y = finalYOffset
+                    view.frame = atLastFrame
+                    
+                    let transform = self.transformWithXAxisValue(0.0, andAngle: 90)
+                    view.layer.zPosition = 400
+                    view.layer.transform = transform
+                    
+                }, completion: nil)
+            })
+        }
+        
+    }
+    
+    class func startExitAnimation(notifierView : UIView?) {
+        
+        if let view = notifierView {
+        
+            let screenBounds = MJAV_APPDELEGATE!.window!!.bounds
+            
+            var notifierFrame = view.frame
+            let finalYOffset = notifierFrame.origin.y - 12
+            notifierFrame.origin.y = finalYOffset
+            
+            UIView.animateWithDuration(0.3, delay: 0, options: UIViewAnimationOptions.CurveEaseOut, animations: { 
+                view.frame = notifierFrame
+                let transform = transformWithXAxisValue(0.1, andAngle: 30)
+                view.layer.zPosition = 400
+                view.layer.transform = transform
+            }, completion: { (finished : Bool) in
+                UIView.animateWithDuration(0.15, delay: 0, options: UIViewAnimationOptions.CurveEaseIn, animations: { 
+                    var atLastFrame = view.frame
+                    atLastFrame.origin.y = CGRectGetHeight(screenBounds)
+                    view.frame = atLastFrame
+                    
+                    let transform = transformWithXAxisValue(-1, andAngle: 90)
+                    view.layer.zPosition = 400
+                    view.layer.transform = transform
+                }, completion: { (finished : Bool) in
+                    view.removeFromSuperview()
+                })
+            })
+        }
+    }
+    
+    class func transformWithXAxisValue(xValue : CGFloat, andAngle angle : CGFloat) -> CATransform3D {
+        var transform = CATransform3DIdentity
+        
+        transform.m34 = 1.0 / -1000
+        
+        transform = CATransform3DRotate(transform, angle * M_PI.toCGFloat / 180, xValue, 0, 0)
+        
+        return transform
+    }
+}
\ No newline at end of file
diff --git a/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/ViewController.swift b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/ViewController.swift
new file mode 100644
index 0000000..65d4516
--- /dev/null
+++ b/MJAlertViewDemo-Swift/MJAlertViewDemo-Swift/ViewController.swift
@@ -0,0 +1,40 @@
+//
+//  ViewController.swift
+//  MJAlertViewDemo-Swift
+//
+//  Created by Jason.Chengzi on 7/15/16.
+//  Copyright © 2016 Jason. All rights reserved.
+//
+
+import UIKit
+
+class ViewController: UIViewController {
+
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        // Do any additional setup after loading the view, typically from a nib.
+    }
+
+    override func didReceiveMemoryWarning() {
+        super.didReceiveMemoryWarning()
+        // Dispose of any resources that can be recreated.
+    }
+
+    @IBAction func showSuccess(sender: AnyObject) {
+        UIView.makeSuccessNotificationWithText("Success Color")
+    }
+    
+    @IBAction func showError(sender: AnyObject) {
+        UIView.makeErrorNotificationWithText("Error Color")
+    }
+    
+    @IBAction func showWarn(sender: AnyObject) {
+        UIView.makeWarnNotificationWithText("Warn Color")
+    }
+    
+    @IBAction func showInfo(sender: AnyObject) {
+        UIView.makeInfoNotificationWithText("Info Color")
+    }
+    
+}
+
diff --git a/MJAlertViewDemo/MJAlertViewDemo.xcodeproj/project.xcworkspace/xcuserdata/JasonLee.xcuserdatad/UserInterfaceState.xcuserstate b/MJAlertViewDemo/MJAlertViewDemo.xcodeproj/project.xcworkspace/xcuserdata/JasonLee.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644
index 0000000000000000000000000000000000000000..4ee4b12c88e2212f7b30394361ee8618cdf5c8c6
GIT binary patch
diff --git a/MJAlertViewDemo/MJAlertViewDemo.xcodeproj/xcuserdata/JasonLee.xcuserdatad/xcschemes/MJAlertViewDemo.xcscheme b/MJAlertViewDemo/MJAlertViewDemo.xcodeproj/xcuserdata/JasonLee.xcuserdatad/xcschemes/MJAlertViewDemo.xcscheme
new file mode 100644
index 0000000..4702ac9
--- /dev/null
+++ b/MJAlertViewDemo/MJAlertViewDemo.xcodeproj/xcuserdata/JasonLee.xcuserdatad/xcschemes/MJAlertViewDemo.xcscheme
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "0730"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "4D50BACA1A9610B100EC9FDC"
+               BuildableName = "MJAlertViewDemo.app"
+               BlueprintName = "MJAlertViewDemo"
+               ReferencedContainer = "container:MJAlertViewDemo.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <Testables>
+         <TestableReference
+            skipped = "NO">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "4D50BAE31A9610B100EC9FDC"
+               BuildableName = "MJAlertViewDemoTests.xctest"
+               BlueprintName = "MJAlertViewDemoTests"
+               ReferencedContainer = "container:MJAlertViewDemo.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
+      </Testables>
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "4D50BACA1A9610B100EC9FDC"
+            BuildableName = "MJAlertViewDemo.app"
+            BlueprintName = "MJAlertViewDemo"
+            ReferencedContainer = "container:MJAlertViewDemo.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "4D50BACA1A9610B100EC9FDC"
+            BuildableName = "MJAlertViewDemo.app"
+            BlueprintName = "MJAlertViewDemo"
+            ReferencedContainer = "container:MJAlertViewDemo.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Release"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "4D50BACA1A9610B100EC9FDC"
+            BuildableName = "MJAlertViewDemo.app"
+            BlueprintName = "MJAlertViewDemo"
+            ReferencedContainer = "container:MJAlertViewDemo.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>
diff --git a/MJAlertViewDemo/MJAlertViewDemo.xcodeproj/xcuserdata/JasonLee.xcuserdatad/xcschemes/xcschememanagement.plist b/MJAlertViewDemo/MJAlertViewDemo.xcodeproj/xcuserdata/JasonLee.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 0000000..595bc18
--- /dev/null
+++ b/MJAlertViewDemo/MJAlertViewDemo.xcodeproj/xcuserdata/JasonLee.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>SchemeUserState</key>
+	<dict>
+		<key>MJAlertViewDemo.xcscheme</key>
+		<dict>
+			<key>orderHint</key>
+			<integer>0</integer>
+		</dict>
+	</dict>
+	<key>SuppressBuildableAutocreation</key>
+	<dict>
+		<key>4D50BACA1A9610B100EC9FDC</key>
+		<dict>
+			<key>primary</key>
+			<true/>
+		</dict>
+		<key>4D50BAE31A9610B100EC9FDC</key>
+		<dict>
+			<key>primary</key>
+			<true/>
+		</dict>
+	</dict>
+</dict>
+</plist>
diff --git a/MJAlertViewDemo/MJAlertViewDemo/Base.lproj/Main.storyboard b/MJAlertViewDemo/MJAlertViewDemo/Base.lproj/Main.storyboard
index e277f1f..4c98c65 100644
--- a/MJAlertViewDemo/MJAlertViewDemo/Base.lproj/Main.storyboard
+++ b/MJAlertViewDemo/MJAlertViewDemo/Base.lproj/Main.storyboard
@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6254" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc">
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
     </dependencies>
     <scenes>
         <!--View Controller-->
