Full Code of hryk224/PCLBlurEffectAlert for AI

master c387b6962ff7 cached
30 files
126.6 KB
29.5k tokens
1 requests
Download .txt
Repository: hryk224/PCLBlurEffectAlert
Branch: master
Commit: c387b6962ff7
Files: 30
Total size: 126.6 KB

Directory structure:
gitextract_2sf9pjr1/

├── .gitignore
├── .swift-version
├── Example/
│   ├── Example/
│   │   ├── AppDelegate.swift
│   │   ├── Assets.swift
│   │   ├── Assets.xcassets/
│   │   │   ├── AppIcon.appiconset/
│   │   │   │   └── Contents.json
│   │   │   ├── Contents.json
│   │   │   ├── sample1.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── sample2.imageset/
│   │   │   │   └── Contents.json
│   │   │   └── sampleBackground.imageset/
│   │   │       └── Contents.json
│   │   ├── Base.lproj/
│   │   │   ├── LaunchScreen.storyboard
│   │   │   └── MainViewController.storyboard
│   │   ├── Info.plist
│   │   └── MainViewController.swift
│   └── Example.xcodeproj/
│       ├── project.pbxproj
│       └── project.xcworkspace/
│           └── contents.xcworkspacedata
├── LICENSE
├── PCLBlurEffectAlert.podspec
├── PCLBlurEffectAlert.xcodeproj/
│   ├── PCLBlurEffectAlertTests_Info.plist
│   ├── PCLBlurEffectAlert_Info.plist
│   ├── project.pbxproj
│   ├── project.xcworkspace/
│   │   └── contents.xcworkspacedata
│   └── xcshareddata/
│       └── xcschemes/
│           ├── PCLBlurEffectAlert.xcscheme
│           └── xcschememanagement.plist
├── Package.swift
├── README.md
└── Sources/
    ├── PCLBlurEffectAlert+Action.swift
    ├── PCLBlurEffectAlert+Controller.swift
    ├── PCLBlurEffectAlert+TransitionAnimator.swift
    ├── PCLBlurEffectAlert.h
    └── PCLBlurEffectAlert.swift

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
# Mac
.DS_Store

# Xcode
build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
profile
*.moved-aside
DerivedData
.idea/

*.ipa
*.app

*.xccheckout
sort-Xcode-project-file

================================================
FILE: .swift-version
================================================
3.0


================================================
FILE: Example/Example/AppDelegate.swift
================================================
//
//  AppDelegate.swift
//  Example
//
//  Created by yoshida hiroyuki on 2015/10/15.
//  Copyright © 2015年 yoshida hiroyuki. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?


    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> 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:.
    }


}



================================================
FILE: Example/Example/Assets.swift
================================================
//
//  Assets.swift
//  Example
//
//  Created by yoshida hiroyuki on 2017/02/27.
//  Copyright © 2017年 hiroyuki yoshida. All rights reserved.
//

import UIKit

struct Assets {
    static let image = Assets.Image.share
    struct Image {
        static let share: Assets.Image = Image()
        var sample1: UIImage {
            return UIImage(named: "sample1")!
        }
        var sample2: UIImage {
            return UIImage(named: "sample2")!
        }
    }
}


================================================
FILE: Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "iphone",
      "size" : "20x20",
      "scale" : "2x"
    },
    {
      "idiom" : "iphone",
      "size" : "20x20",
      "scale" : "3x"
    },
    {
      "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"
    },
    {
      "idiom" : "ipad",
      "size" : "20x20",
      "scale" : "1x"
    },
    {
      "idiom" : "ipad",
      "size" : "20x20",
      "scale" : "2x"
    },
    {
      "idiom" : "ipad",
      "size" : "29x29",
      "scale" : "1x"
    },
    {
      "idiom" : "ipad",
      "size" : "29x29",
      "scale" : "2x"
    },
    {
      "idiom" : "ipad",
      "size" : "40x40",
      "scale" : "1x"
    },
    {
      "idiom" : "ipad",
      "size" : "40x40",
      "scale" : "2x"
    },
    {
      "idiom" : "ipad",
      "size" : "76x76",
      "scale" : "1x"
    },
    {
      "idiom" : "ipad",
      "size" : "76x76",
      "scale" : "2x"
    },
    {
      "idiom" : "ipad",
      "size" : "83.5x83.5",
      "scale" : "2x"
    }
  ],
  "info" : {
    "version" : 1,
    "author" : "xcode"
  }
}

================================================
FILE: Example/Example/Assets.xcassets/Contents.json
================================================
{
  "info" : {
    "version" : 1,
    "author" : "xcode"
  }
}

================================================
FILE: Example/Example/Assets.xcassets/sample1.imageset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "universal",
      "filename" : "recipes.png",
      "scale" : "1x"
    },
    {
      "idiom" : "universal",
      "scale" : "2x"
    },
    {
      "idiom" : "universal",
      "scale" : "3x"
    }
  ],
  "info" : {
    "version" : 1,
    "author" : "xcode"
  }
}

================================================
FILE: Example/Example/Assets.xcassets/sample2.imageset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "universal",
      "filename" : "cat.jpg",
      "scale" : "1x"
    },
    {
      "idiom" : "universal",
      "scale" : "2x"
    },
    {
      "idiom" : "universal",
      "scale" : "3x"
    }
  ],
  "info" : {
    "version" : 1,
    "author" : "xcode"
  }
}

================================================
FILE: Example/Example/Assets.xcassets/sampleBackground.imageset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "universal",
      "filename" : "PAKU160126410I9A5301-thumb-autox1600-21285.jpg",
      "scale" : "1x"
    },
    {
      "idiom" : "universal",
      "scale" : "2x"
    },
    {
      "idiom" : "universal",
      "scale" : "3x"
    }
  ],
  "info" : {
    "version" : 1,
    "author" : "xcode"
  }
}

================================================
FILE: Example/Example/Base.lproj/LaunchScreen.storyboard
================================================
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </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="375" height="667"/>
                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                    </view>
                </viewController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="-337" y="18"/>
        </scene>
    </scenes>
</document>


================================================
FILE: Example/Example/Base.lproj/MainViewController.storyboard
================================================
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
    <device id="retina4_7" orientation="portrait">
        <adaptation id="fullscreen"/>
    </device>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </dependencies>
    <scenes>
        <!--Main View Controller-->
        <scene sceneID="tne-QT-ifu">
            <objects>
                <viewController automaticallyAdjustsScrollViewInsets="NO" id="BYZ-38-t0r" customClass="MainViewController" customModule="Example" 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="375" height="667"/>
                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                        <subviews>
                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="sampleBackground" translatesAutoresizingMaskIntoConstraints="NO" id="Lf0-6h-j4A">
                                <rect key="frame" x="137.5" y="0.0" width="100" height="667"/>
                                <constraints>
                                    <constraint firstAttribute="width" constant="100" id="Axo-Le-ewo"/>
                                </constraints>
                            </imageView>
                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="VK3-wA-HIw">
                                <rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                <constraints>
                                    <constraint firstAttribute="height" constant="100" id="Z9P-lH-Zic"/>
                                </constraints>
                            </view>
                            <segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="b8G-F1-453">
                                <rect key="frame" x="8" y="17" width="359" height="29"/>
                                <constraints>
                                    <constraint firstAttribute="height" constant="28" id="IfC-2F-JDi"/>
                                </constraints>
                                <segments>
                                    <segment title="Alert"/>
                                    <segment title="AlertVertical"/>
                                    <segment title="ActionSheet"/>
                                </segments>
                            </segmentedControl>
                            <segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="Ho7-a3-lkY">
                                <rect key="frame" x="8" y="55" width="359" height="29"/>
                                <constraints>
                                    <constraint firstAttribute="height" constant="28" id="tkI-T3-M2Z"/>
                                </constraints>
                                <segments>
                                    <segment title="ExtraLight"/>
                                    <segment title="Light"/>
                                    <segment title="Dark"/>
                                </segments>
                            </segmentedControl>
                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="100" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="5El-06-33n">
                                <rect key="frame" x="0.0" y="100" width="375" height="567"/>
                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
                                <connections>
                                    <outlet property="dataSource" destination="BYZ-38-t0r" id="tX5-Ih-v5I"/>
                                    <outlet property="delegate" destination="BYZ-38-t0r" id="zPS-82-KeQ"/>
                                </connections>
                            </tableView>
                        </subviews>
                        <color key="backgroundColor" red="0.75686274509999996" green="0.1960784314" blue="0.15686274510000001" alpha="1" colorSpace="calibratedRGB"/>
                        <constraints>
                            <constraint firstItem="Lf0-6h-j4A" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="2E8-Eu-cP9"/>
                            <constraint firstItem="Lf0-6h-j4A" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" id="2jL-v9-ttl"/>
                            <constraint firstItem="VK3-wA-HIw" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="6tq-Kf-gX1"/>
                            <constraint firstItem="b8G-F1-453" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" constant="8" id="745-uS-22L"/>
                            <constraint firstAttribute="trailing" secondItem="VK3-wA-HIw" secondAttribute="trailing" id="Fen-w1-tjW"/>
                            <constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="Lf0-6h-j4A" secondAttribute="bottom" id="HjV-oP-bet"/>
                            <constraint firstItem="Ho7-a3-lkY" firstAttribute="top" secondItem="b8G-F1-453" secondAttribute="bottom" constant="10" id="Sij-3w-WAF"/>
                            <constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="5El-06-33n" secondAttribute="bottom" id="Yah-Qo-HTT"/>
                            <constraint firstAttribute="trailing" secondItem="Ho7-a3-lkY" secondAttribute="trailing" constant="8" id="adQ-XY-qwK"/>
                            <constraint firstAttribute="trailing" secondItem="b8G-F1-453" secondAttribute="trailing" constant="8" id="eZU-IT-mBu"/>
                            <constraint firstItem="Ho7-a3-lkY" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" constant="8" id="h3c-Yk-iRZ"/>
                            <constraint firstItem="b8G-F1-453" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" constant="17" id="jKO-uh-ti6"/>
                            <constraint firstItem="VK3-wA-HIw" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" id="jqD-42-hCv"/>
                            <constraint firstItem="5El-06-33n" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="khc-A2-bXb"/>
                            <constraint firstItem="5El-06-33n" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" constant="100" id="mwa-Xh-Ruq"/>
                            <constraint firstAttribute="trailing" secondItem="5El-06-33n" secondAttribute="trailing" id="oXC-Wb-SHt"/>
                        </constraints>
                    </view>
                    <navigationItem key="navigationItem" id="9n1-jh-5Ja"/>
                    <connections>
                        <outlet property="blurEffecrSegmentedControl" destination="Ho7-a3-lkY" id="meq-sq-lcd"/>
                        <outlet property="styleSegmentedControl" destination="b8G-F1-453" id="31G-Cx-7fe"/>
                        <outlet property="tableView" destination="5El-06-33n" id="DUc-Mx-Idw"/>
                    </connections>
                </viewController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="-1346" y="75"/>
        </scene>
    </scenes>
    <resources>
        <image name="sampleBackground" width="1067" height="1600"/>
    </resources>
</document>


================================================
FILE: Example/Example/Info.plist
================================================
<?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>MainViewController</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>


================================================
FILE: Example/Example/MainViewController.swift
================================================
//
//  MainViewController.swift
//  PCLAlertController
//
//  Created by yoshida hiroyuki on 2015/10/12.
//  Copyright © 2015年 yoshida hiroyuki. All rights reserved.
//

import UIKit
import PCLBlurEffectAlert

final class MainViewController: UIViewController {
    enum SampleRow: Int, CustomStringConvertible {
        case oneButton = 0
        case okCancel
        case titleMessage
        case buttonOnly
        case colorful
        case textField
        case image
        static var count: Int { return 7 }
        var description: String {
            switch self {
            case .oneButton: return "One button"
            case .okCancel: return "OK / Cancel"
            case .titleMessage: return "Has title and message"
            case .buttonOnly: return "Button only"
            case .colorful: return "Colorful"
            case .textField: return "Has textFiled"
            case .image: return "Has image"
            }
        }
    }
    enum Segmented: Int {
        case a = 0, b, c
        var style: PCLBlurEffectAlert.ControllerStyle {
            switch self {
            case .a: return .alert
            case .b: return .alertVertical
            case .c: return .actionSheet
            }
        }
        var effect: UIBlurEffect {
            switch self {
            case .a: return UIBlurEffect(style: .extraLight)
            case .b: return UIBlurEffect(style: .light)
            case .c: return UIBlurEffect(style: .dark)
            }
        }
    }
    @IBOutlet weak var styleSegmentedControl: UISegmentedControl!
    @IBOutlet weak var blurEffecrSegmentedControl: UISegmentedControl!
    @IBOutlet var tableView: UITableView! {
        didSet {
            // tableView
            tableView.estimatedRowHeight = 100
            tableView.layoutMargins = .zero
            tableView.separatorInset = .zero
            tableView.register(UITableViewCell.self, forCellReuseIdentifier: "Cell")
        }
    }
    fileprivate var textField1: UITextField? {
        didSet {
            textField1?.addTarget(self, action: #selector(MainViewController.textFieldEditingChanged(_:)), for: UIControlEvents.editingChanged)
        }
    }
    fileprivate var textField2: UITextField? {
        didSet {
            textField2?.addTarget(self, action: #selector(MainViewController.textFieldEditingChanged(_:)), for: UIControlEvents.editingChanged)
        }
    }
    override var prefersStatusBarHidden: Bool {
        return true
    }
}

// MARK: - UITableViewDelegate, UITableViewDataSource
extension MainViewController: UITableViewDelegate, UITableViewDataSource {
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return SampleRow.count
    }
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCell(withIdentifier: "Cell")!
        cell.selectionStyle = .none
        cell.backgroundColor = .clear
        cell.contentView.backgroundColor = .clear
        let row = SampleRow(rawValue: indexPath.row)
        cell.textLabel?.text = row?.description
        return cell
    }
    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        guard let style = Segmented(rawValue: styleSegmentedControl.selectedSegmentIndex)?.style,
            let effectStyle = Segmented(rawValue: blurEffecrSegmentedControl.selectedSegmentIndex),
            let row = SampleRow(rawValue: indexPath.row) else { return }
        let effect = effectStyle.effect
        switch row {
        case .oneButton:
            let alertController = PCLBlurEffectAlertController(title: row.description,
                                                               message: nil,
                                                               effect: effect,
                                                               style: style)
            let action = PCLBlurEffectAlertAction(title: "OK!", style: .default) { _ in
                print("You pressed OK!")
            }
            alertController.addAction(action)
            alertController.show()
        case .okCancel:
            let alertController = PCLBlurEffectAlertController(title: row.description,
                                                               message: nil,
                                                               effect: effect,
                                                               style: style)
            let action1 = PCLBlurEffectAlertAction(title: "OK!", style: .default) { _ in
                print("You pressed OK!")
            }
            let cancelAction = PCLBlurEffectAlertAction(title: "Cancel", style: .cancel) { _ in
                print("You pressed Cancel")
            }
            alertController.configure(alertViewWidth: 200)
            alertController.configure(cornerRadius: 0)
            alertController.addAction(action1)
            alertController.addAction(cancelAction)
            alertController.show()
        case .titleMessage:
            let alertController = PCLBlurEffectAlertController(title: "How are you doing?",
                                                               message: "Press a button!",
                                                               effect: effect,
                                                               style: style)
            switch effectStyle {
            case .c:
                alertController.configure(titleColor: .white)
                alertController.configure(messageColor: .white)
            default:
                break
            }
            let action1 = PCLBlurEffectAlertAction(title: "I’m fine.", style: .default) { _ in
                print("You pressed I’m fine.")
            }
            let action2 = PCLBlurEffectAlertAction(title: "Not so good.", style: .default) { _ in
                print("You pressed Not so good.")
            }
            alertController.addAction(action1)
            alertController.addAction(action2)
            alertController.show()
        case .buttonOnly:
            let alertController = PCLBlurEffectAlertController(title: nil,
                                                               message: nil,
                                                               effect: effect,
                                                               style: style)
            let action1 = PCLBlurEffectAlertAction(title: "Default", style: .default) { _ in
                print("You pressed Default")
            }
            let action2 = PCLBlurEffectAlertAction(title: "Destructive", style: .destructive) { _ in
                print("You pressed Destructive")
            }
            let cancelAction = PCLBlurEffectAlertAction(title: "Cancel", style: .cancel) { _ in
                print("You pressed Cancel")
            }
            alertController.addAction(action1)
            alertController.addAction(action2)
            alertController.addAction(cancelAction)
            alertController.show()
        case .colorful:
            let alertController = PCLBlurEffectAlertController(title: "title title title\ntitle title title title",
                                                               message: "message message message\n message message",
                                                               effect: effect,
                                                               style: style)
            alertController.configure(overlayBackgroundColor: UIColor.orange)
            alertController.configure(titleFont: UIFont.systemFont(ofSize: 24),
                                      titleColor: .red)
            alertController.configure(messageColor: .blue)
            alertController.configure(buttonFont: [.default: UIFont.systemFont(ofSize: 24),
                                                   .destructive: UIFont.boldSystemFont(ofSize: 20),
                                                   .cancel: UIFont.systemFont(ofSize: 14)],
                                      buttonTextColor: [.default: .brown,
                                                        .destructive: .blue,
                                                        .cancel: .gray])
            let action1 = PCLBlurEffectAlertAction(title: "Default", style: .default) { _ in
                print("You pressed No.1")
            }
            let action2 = PCLBlurEffectAlertAction(title: "Destructive", style: .destructive) { _ in
                print("You pressed No.2")
            }
            let cancelAction = PCLBlurEffectAlertAction(title: "Cancel", style: .cancel) { _ in
                print("You pressed Cancel")
            }
            alertController.addAction(action1)
            alertController.addAction(action2)
            alertController.addAction(cancelAction)
            alertController.show()
        case .textField:
            let alertController = PCLBlurEffectAlertController(title: "title title title title title title title",
                                                               message: "message message message message message",
                                                               effect: effect,
                                                               style: style)
            alertController.addTextField { textField in
                self.textField1 = textField
            }
            alertController.addTextField { textField in
                self.textField2 = textField
            }
            alertController.configure(textFieldsViewBackgroundColor: UIColor.white.withAlphaComponent(0.1))
            alertController.configure(textFieldBorderColor: .black)
            alertController.configure(buttonDisableTextColor: [.default: .lightGray, .destructive: .lightGray])
            let action1 = PCLBlurEffectAlertAction(title: "Default", style: .default) { _ in
                print("You pressed Default")
            }
            let action2 = PCLBlurEffectAlertAction(title: "Destructive", style: .destructive) { _ in
                print("You pressed Destructive")
            }
            let cancelAction = PCLBlurEffectAlertAction(title: "Cancel", style: .cancel) { _ in
                print("You pressed Cancel")
            }
            action1.isEnabled = false
            action2.isEnabled = false
            alertController.addAction(action1)
            alertController.addAction(action2)
            alertController.addAction(cancelAction)
            alertController.show()
        case .image:
            let alertController = PCLBlurEffectAlertController(title: "title title title title title title title",
                                                               message: "message message message message message",
                                                               effect: effect,
                                                               style: style)
            alertController.addImageView(with: Assets.image.sample2)
            switch effectStyle {
            case .c:
                alertController.configure(titleColor: .white)
                alertController.configure(messageColor: .white)
            default:
                break
            }
            let catAction = PCLBlurEffectAlertAction(title: "Cat?", style: .default) { _ in
                print("You pressed Cat?")
            }
            let dogAction = PCLBlurEffectAlertAction(title: "Dog?", style: .default) { _ in
                print("You pressed Dog?")
            }
            alertController.addAction(catAction)
            alertController.addAction(dogAction)
            alertController.show()
        }
    }
}

// MARK: - UITextFieldDelegate
extension MainViewController {
    func textFieldEditingChanged(_ textField: UITextField) {
        guard let alertController = presentedViewController as? PCLBlurEffectAlertController else {
            return
        }
        alertController.actions.filter { $0.style != .cancel }.forEach {
            $0.isEnabled = textField1?.text?.isEmpty == false && textField2?.text?.isEmpty == false
        }
    }
}


================================================
FILE: Example/Example.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
	archiveVersion = 1;
	classes = {
	};
	objectVersion = 46;
	objects = {

/* Begin PBXBuildFile section */
		935BD7381CE272F400E5FDF7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 935BD7371CE272F400E5FDF7 /* AppDelegate.swift */; };
		935BD73A1CE272F400E5FDF7 /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 935BD7391CE272F400E5FDF7 /* MainViewController.swift */; };
		935BD73D1CE272F400E5FDF7 /* MainViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 935BD73B1CE272F400E5FDF7 /* MainViewController.storyboard */; };
		935BD73F1CE272F400E5FDF7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 935BD73E1CE272F400E5FDF7 /* Assets.xcassets */; };
		935BD7421CE272F400E5FDF7 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 935BD7401CE272F400E5FDF7 /* LaunchScreen.storyboard */; };
		ED413F421D8AA81B0024036E /* PCLBlurEffectAlert.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED413F411D8AA8130024036E /* PCLBlurEffectAlert.framework */; };
		ED413F431D8AA81B0024036E /* PCLBlurEffectAlert.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = ED413F411D8AA8130024036E /* PCLBlurEffectAlert.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
		ED6872461E63C12900B8A0B4 /* Assets.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED6872451E63C12900B8A0B4 /* Assets.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
		ED413F401D8AA8130024036E /* PBXContainerItemProxy */ = {
			isa = PBXContainerItemProxy;
			containerPortal = ED413F3C1D8AA8130024036E /* PCLBlurEffectAlert.xcodeproj */;
			proxyType = 2;
			remoteGlobalIDString = 935BD7B81CE274A500E5FDF7;
			remoteInfo = PCLBlurEffectAlert;
		};
		ED413F441D8AA81B0024036E /* PBXContainerItemProxy */ = {
			isa = PBXContainerItemProxy;
			containerPortal = ED413F3C1D8AA8130024036E /* PCLBlurEffectAlert.xcodeproj */;
			proxyType = 1;
			remoteGlobalIDString = OBJ_17;
			remoteInfo = PCLBlurEffectAlert;
		};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
		935BD7EA1CE2759F00E5FDF7 /* Embed Frameworks */ = {
			isa = PBXCopyFilesBuildPhase;
			buildActionMask = 2147483647;
			dstPath = "";
			dstSubfolderSpec = 10;
			files = (
				ED413F431D8AA81B0024036E /* PCLBlurEffectAlert.framework in Embed Frameworks */,
			);
			name = "Embed Frameworks";
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
		935BD7341CE272F400E5FDF7 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
		935BD7371CE272F400E5FDF7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
		935BD7391CE272F400E5FDF7 /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
		935BD73C1CE272F400E5FDF7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainViewController.storyboard; sourceTree = "<group>"; };
		935BD73E1CE272F400E5FDF7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
		935BD7411CE272F400E5FDF7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
		935BD7431CE272F400E5FDF7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
		ED413F3C1D8AA8130024036E /* PCLBlurEffectAlert.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = PCLBlurEffectAlert.xcodeproj; path = ../PCLBlurEffectAlert.xcodeproj; sourceTree = "<group>"; };
		ED6872451E63C12900B8A0B4 /* Assets.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Assets.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
		935BD7311CE272F400E5FDF7 /* Frameworks */ = {
			isa = PBXFrameworksBuildPhase;
			buildActionMask = 2147483647;
			files = (
				ED413F421D8AA81B0024036E /* PCLBlurEffectAlert.framework in Frameworks */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
		935BD72B1CE272F400E5FDF7 = {
			isa = PBXGroup;
			children = (
				935BD7361CE272F400E5FDF7 /* Example */,
				ED413F3B1D8AA8130024036E /* Frameworks */,
				935BD7351CE272F400E5FDF7 /* Products */,
			);
			sourceTree = "<group>";
		};
		935BD7351CE272F400E5FDF7 /* Products */ = {
			isa = PBXGroup;
			children = (
				935BD7341CE272F400E5FDF7 /* Example.app */,
			);
			name = Products;
			sourceTree = "<group>";
		};
		935BD7361CE272F400E5FDF7 /* Example */ = {
			isa = PBXGroup;
			children = (
				935BD7371CE272F400E5FDF7 /* AppDelegate.swift */,
				ED6872451E63C12900B8A0B4 /* Assets.swift */,
				935BD73E1CE272F400E5FDF7 /* Assets.xcassets */,
				935BD7431CE272F400E5FDF7 /* Info.plist */,
				935BD7401CE272F400E5FDF7 /* LaunchScreen.storyboard */,
				935BD73B1CE272F400E5FDF7 /* MainViewController.storyboard */,
				935BD7391CE272F400E5FDF7 /* MainViewController.swift */,
			);
			path = Example;
			sourceTree = "<group>";
		};
		ED413F3B1D8AA8130024036E /* Frameworks */ = {
			isa = PBXGroup;
			children = (
				ED413F3C1D8AA8130024036E /* PCLBlurEffectAlert.xcodeproj */,
			);
			name = Frameworks;
			sourceTree = "<group>";
		};
		ED413F3D1D8AA8130024036E /* Products */ = {
			isa = PBXGroup;
			children = (
				ED413F411D8AA8130024036E /* PCLBlurEffectAlert.framework */,
			);
			name = Products;
			sourceTree = "<group>";
		};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
		935BD7331CE272F400E5FDF7 /* Example */ = {
			isa = PBXNativeTarget;
			buildConfigurationList = 935BD7461CE272F400E5FDF7 /* Build configuration list for PBXNativeTarget "Example" */;
			buildPhases = (
				935BD7301CE272F400E5FDF7 /* Sources */,
				935BD7311CE272F400E5FDF7 /* Frameworks */,
				935BD7321CE272F400E5FDF7 /* Resources */,
				935BD7EA1CE2759F00E5FDF7 /* Embed Frameworks */,
			);
			buildRules = (
			);
			dependencies = (
				ED413F451D8AA81B0024036E /* PBXTargetDependency */,
			);
			name = Example;
			productName = Example;
			productReference = 935BD7341CE272F400E5FDF7 /* Example.app */;
			productType = "com.apple.product-type.application";
		};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
		935BD72C1CE272F400E5FDF7 /* Project object */ = {
			isa = PBXProject;
			attributes = {
				LastSwiftUpdateCheck = 0730;
				LastUpgradeCheck = 0800;
				ORGANIZATIONNAME = "hiroyuki yoshida";
				TargetAttributes = {
					935BD7331CE272F400E5FDF7 = {
						CreatedOnToolsVersion = 7.3.1;
						LastSwiftMigration = 0800;
					};
				};
			};
			buildConfigurationList = 935BD72F1CE272F400E5FDF7 /* Build configuration list for PBXProject "Example" */;
			compatibilityVersion = "Xcode 3.2";
			developmentRegion = English;
			hasScannedForEncodings = 0;
			knownRegions = (
				en,
				Base,
			);
			mainGroup = 935BD72B1CE272F400E5FDF7;
			productRefGroup = 935BD7351CE272F400E5FDF7 /* Products */;
			projectDirPath = "";
			projectReferences = (
				{
					ProductGroup = ED413F3D1D8AA8130024036E /* Products */;
					ProjectRef = ED413F3C1D8AA8130024036E /* PCLBlurEffectAlert.xcodeproj */;
				},
			);
			projectRoot = "";
			targets = (
				935BD7331CE272F400E5FDF7 /* Example */,
			);
		};
/* End PBXProject section */

/* Begin PBXReferenceProxy section */
		ED413F411D8AA8130024036E /* PCLBlurEffectAlert.framework */ = {
			isa = PBXReferenceProxy;
			fileType = wrapper.framework;
			path = PCLBlurEffectAlert.framework;
			remoteRef = ED413F401D8AA8130024036E /* PBXContainerItemProxy */;
			sourceTree = BUILT_PRODUCTS_DIR;
		};
/* End PBXReferenceProxy section */

/* Begin PBXResourcesBuildPhase section */
		935BD7321CE272F400E5FDF7 /* Resources */ = {
			isa = PBXResourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				935BD73F1CE272F400E5FDF7 /* Assets.xcassets in Resources */,
				935BD7421CE272F400E5FDF7 /* LaunchScreen.storyboard in Resources */,
				935BD73D1CE272F400E5FDF7 /* MainViewController.storyboard in Resources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
		935BD7301CE272F400E5FDF7 /* Sources */ = {
			isa = PBXSourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				935BD7381CE272F400E5FDF7 /* AppDelegate.swift in Sources */,
				ED6872461E63C12900B8A0B4 /* Assets.swift in Sources */,
				935BD73A1CE272F400E5FDF7 /* MainViewController.swift in Sources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
		ED413F451D8AA81B0024036E /* PBXTargetDependency */ = {
			isa = PBXTargetDependency;
			name = PCLBlurEffectAlert;
			targetProxy = ED413F441D8AA81B0024036E /* PBXContainerItemProxy */;
		};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
		935BD73B1CE272F400E5FDF7 /* MainViewController.storyboard */ = {
			isa = PBXVariantGroup;
			children = (
				935BD73C1CE272F400E5FDF7 /* Base */,
			);
			name = MainViewController.storyboard;
			sourceTree = "<group>";
		};
		935BD7401CE272F400E5FDF7 /* LaunchScreen.storyboard */ = {
			isa = PBXVariantGroup;
			children = (
				935BD7411CE272F400E5FDF7 /* Base */,
			);
			name = LaunchScreen.storyboard;
			sourceTree = "<group>";
		};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
		935BD7441CE272F400E5FDF7 /* 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_INFINITE_RECURSION = YES;
				CLANG_WARN_INT_CONVERSION = YES;
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
				CLANG_WARN_SUSPICIOUS_MOVE = YES;
				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 = 8.0;
				MTL_ENABLE_DEBUG_INFO = YES;
				ONLY_ACTIVE_ARCH = YES;
				SDKROOT = iphoneos;
				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
			};
			name = Debug;
		};
		935BD7451CE272F400E5FDF7 /* 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_INFINITE_RECURSION = YES;
				CLANG_WARN_INT_CONVERSION = YES;
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
				CLANG_WARN_SUSPICIOUS_MOVE = YES;
				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 = 8.0;
				MTL_ENABLE_DEBUG_INFO = NO;
				SDKROOT = iphoneos;
				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
				VALIDATE_PRODUCT = YES;
			};
			name = Release;
		};
		935BD7471CE272F400E5FDF7 /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
				INFOPLIST_FILE = Example/Info.plist;
				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
				PRODUCT_BUNDLE_IDENTIFIER = io.github.hryk224.Example;
				PRODUCT_NAME = "$(TARGET_NAME)";
				SWIFT_VERSION = 3.0;
			};
			name = Debug;
		};
		935BD7481CE272F400E5FDF7 /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
				INFOPLIST_FILE = Example/Info.plist;
				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
				PRODUCT_BUNDLE_IDENTIFIER = io.github.hryk224.Example;
				PRODUCT_NAME = "$(TARGET_NAME)";
				SWIFT_VERSION = 3.0;
			};
			name = Release;
		};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
		935BD72F1CE272F400E5FDF7 /* Build configuration list for PBXProject "Example" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				935BD7441CE272F400E5FDF7 /* Debug */,
				935BD7451CE272F400E5FDF7 /* Release */,
			);
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Release;
		};
		935BD7461CE272F400E5FDF7 /* Build configuration list for PBXNativeTarget "Example" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				935BD7471CE272F400E5FDF7 /* Debug */,
				935BD7481CE272F400E5FDF7 /* Release */,
			);
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Release;
		};
/* End XCConfigurationList section */
	};
	rootObject = 935BD72C1CE272F400E5FDF7 /* Project object */;
}


================================================
FILE: Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
   version = "1.0">
   <FileRef
      location = "self:Example.xcodeproj">
   </FileRef>
</Workspace>


================================================
FILE: LICENSE
================================================
The MIT License (MIT)

Copyright (c) 2015 hryk224

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: PCLBlurEffectAlert.podspec
================================================
Pod::Spec.new do |s|
  s.name         = "PCLBlurEffectAlert"
  s.version      = "2.1.1"
  s.summary      = "Custom Swift AlertController."
  s.homepage     = "https://github.com/hryk224/PCLBlurEffectAlert"
  s.screenshots  = "https://raw.githubusercontent.com/wiki/hryk224/PCLBlurEffectAlert/images/sample1.gif"
  s.license      = { :type => "MIT", :file => "LICENSE" }
  s.author             = { "hyyk224" => "hryk224@gmail.com" }
  s.platform     = :ios, "8.0"
  s.source       = { :git => "https://github.com/hryk224/PCLBlurEffectAlert.git", :tag => "#{s.version}" }
  s.source_files  = "Sources/*.{h,swift}"
  s.frameworks = "UIKit"
  s.requires_arc = true
end


================================================
FILE: PCLBlurEffectAlert.xcodeproj/PCLBlurEffectAlertTests_Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<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>BNDL</string>
  <key>CFBundleShortVersionString</key>
  <string>1.0</string>
  <key>CFBundleSignature</key>
  <string>????</string>
  <key>CFBundleVersion</key>
  <string>$(CURRENT_PROJECT_VERSION)</string>
  <key>NSPrincipalClass</key>
  <string></string>
</dict>
</plist>


================================================
FILE: PCLBlurEffectAlert.xcodeproj/PCLBlurEffectAlert_Info.plist
================================================
<?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>FMWK</string>
	<key>CFBundleShortVersionString</key>
	<string>2.1.1</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>$(CURRENT_PROJECT_VERSION)</string>
	<key>NSPrincipalClass</key>
	<string></string>
</dict>
</plist>


================================================
FILE: PCLBlurEffectAlert.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
	archiveVersion = 1;
	classes = {
	};
	objectVersion = 46;
	objects = {

/* Begin PBXBuildFile section */
		93905ED61E630FC500A483CD /* PCLBlurEffectAlert+TransitionAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93905ED51E630FC500A483CD /* PCLBlurEffectAlert+TransitionAnimator.swift */; };
		93CE21B21E563926003D4137 /* PCLBlurEffectAlert+Action.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93CE21B01E563926003D4137 /* PCLBlurEffectAlert+Action.swift */; };
		93CE21B31E563926003D4137 /* PCLBlurEffectAlert+Controller.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93CE21B11E563926003D4137 /* PCLBlurEffectAlert+Controller.swift */; };
		93CE21B51E563938003D4137 /* PCLBlurEffectAlert.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93CE21B41E563938003D4137 /* PCLBlurEffectAlert.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
		93905ED51E630FC500A483CD /* PCLBlurEffectAlert+TransitionAnimator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "PCLBlurEffectAlert+TransitionAnimator.swift"; sourceTree = "<group>"; };
		93CE21AF1E563926003D4137 /* PCLBlurEffectAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PCLBlurEffectAlert.h; sourceTree = "<group>"; };
		93CE21B01E563926003D4137 /* PCLBlurEffectAlert+Action.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "PCLBlurEffectAlert+Action.swift"; sourceTree = "<group>"; };
		93CE21B11E563926003D4137 /* PCLBlurEffectAlert+Controller.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "PCLBlurEffectAlert+Controller.swift"; sourceTree = "<group>"; };
		93CE21B41E563938003D4137 /* PCLBlurEffectAlert.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PCLBlurEffectAlert.swift; sourceTree = "<group>"; };
		OBJ_15 /* PCLBlurEffectAlert.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PCLBlurEffectAlert.framework; sourceTree = BUILT_PRODUCTS_DIR; };
		OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
		OBJ_23 /* Frameworks */ = {
			isa = PBXFrameworksBuildPhase;
			buildActionMask = 0;
			files = (
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
		OBJ_14 /* Products */ = {
			isa = PBXGroup;
			children = (
				OBJ_15 /* PCLBlurEffectAlert.framework */,
			);
			name = Products;
			sourceTree = BUILT_PRODUCTS_DIR;
		};
		OBJ_5 = {
			isa = PBXGroup;
			children = (
				OBJ_6 /* Package.swift */,
				OBJ_7 /* Sources */,
				OBJ_14 /* Products */,
			);
			sourceTree = "<group>";
		};
		OBJ_7 /* Sources */ = {
			isa = PBXGroup;
			children = (
				OBJ_8 /* PCLBlurEffectAlert */,
			);
			path = Sources;
			sourceTree = "<group>";
		};
		OBJ_8 /* PCLBlurEffectAlert */ = {
			isa = PBXGroup;
			children = (
				93CE21B01E563926003D4137 /* PCLBlurEffectAlert+Action.swift */,
				93CE21B11E563926003D4137 /* PCLBlurEffectAlert+Controller.swift */,
				93905ED51E630FC500A483CD /* PCLBlurEffectAlert+TransitionAnimator.swift */,
				93CE21AF1E563926003D4137 /* PCLBlurEffectAlert.h */,
				93CE21B41E563938003D4137 /* PCLBlurEffectAlert.swift */,
			);
			name = PCLBlurEffectAlert;
			path = Sources;
			sourceTree = SOURCE_ROOT;
		};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
		OBJ_17 /* PCLBlurEffectAlert */ = {
			isa = PBXNativeTarget;
			buildConfigurationList = OBJ_18 /* Build configuration list for PBXNativeTarget "PCLBlurEffectAlert" */;
			buildPhases = (
				OBJ_21 /* Sources */,
				OBJ_23 /* Frameworks */,
			);
			buildRules = (
			);
			dependencies = (
			);
			name = PCLBlurEffectAlert;
			productName = PCLBlurEffectAlert;
			productReference = OBJ_15 /* PCLBlurEffectAlert.framework */;
			productType = "com.apple.product-type.framework";
		};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
		OBJ_1 /* Project object */ = {
			isa = PBXProject;
			attributes = {
				LastUpgradeCheck = 9999;
				TargetAttributes = {
					OBJ_17 = {
						LastSwiftMigration = 0820;
					};
				};
			};
			buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "PCLBlurEffectAlert" */;
			compatibilityVersion = "Xcode 3.2";
			developmentRegion = English;
			hasScannedForEncodings = 0;
			knownRegions = (
				en,
			);
			mainGroup = OBJ_5;
			productRefGroup = OBJ_14 /* Products */;
			projectDirPath = "";
			projectRoot = "";
			targets = (
				OBJ_17 /* PCLBlurEffectAlert */,
			);
		};
/* End PBXProject section */

/* Begin PBXSourcesBuildPhase section */
		OBJ_21 /* Sources */ = {
			isa = PBXSourcesBuildPhase;
			buildActionMask = 0;
			files = (
				93CE21B21E563926003D4137 /* PCLBlurEffectAlert+Action.swift in Sources */,
				93CE21B31E563926003D4137 /* PCLBlurEffectAlert+Controller.swift in Sources */,
				93905ED61E630FC500A483CD /* PCLBlurEffectAlert+TransitionAnimator.swift in Sources */,
				93CE21B51E563938003D4137 /* PCLBlurEffectAlert.swift in Sources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
		OBJ_19 /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				CLANG_ENABLE_MODULES = YES;
				DEFINES_MODULE = YES;
				ENABLE_TESTABILITY = YES;
				FRAMEWORK_SEARCH_PATHS = (
					"$(inherited)",
					"$(PLATFORM_DIR)/Developer/Library/Frameworks",
				);
				HEADER_SEARCH_PATHS = "$(inherited)";
				INFOPLIST_FILE = PCLBlurEffectAlert.xcodeproj/PCLBlurEffectAlert_Info.plist;
				LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
				OTHER_LDFLAGS = "$(inherited)";
				OTHER_SWIFT_FLAGS = "$(inherited)";
				PRODUCT_BUNDLE_IDENTIFIER = PCLBlurEffectAlert;
				PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
				PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
				SWIFT_VERSION = 3.0;
				TARGET_NAME = PCLBlurEffectAlert;
			};
			name = Debug;
		};
		OBJ_20 /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				CLANG_ENABLE_MODULES = YES;
				DEFINES_MODULE = YES;
				ENABLE_TESTABILITY = YES;
				FRAMEWORK_SEARCH_PATHS = (
					"$(inherited)",
					"$(PLATFORM_DIR)/Developer/Library/Frameworks",
				);
				HEADER_SEARCH_PATHS = "$(inherited)";
				INFOPLIST_FILE = PCLBlurEffectAlert.xcodeproj/PCLBlurEffectAlert_Info.plist;
				LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
				OTHER_LDFLAGS = "$(inherited)";
				OTHER_SWIFT_FLAGS = "$(inherited)";
				PRODUCT_BUNDLE_IDENTIFIER = PCLBlurEffectAlert;
				PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
				PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
				SWIFT_VERSION = 3.0;
				TARGET_NAME = PCLBlurEffectAlert;
			};
			name = Release;
		};
		OBJ_3 /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				COMBINE_HIDPI_IMAGES = YES;
				COPY_PHASE_STRIP = NO;
				DEBUG_INFORMATION_FORMAT = dwarf;
				DYLIB_INSTALL_NAME_BASE = "@rpath";
				ENABLE_NS_ASSERTIONS = YES;
				GCC_OPTIMIZATION_LEVEL = 0;
				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
				MACOSX_DEPLOYMENT_TARGET = 10.10;
				ONLY_ACTIVE_ARCH = YES;
				OTHER_SWIFT_FLAGS = "-DXcode";
				PRODUCT_NAME = "$(TARGET_NAME)";
				SDKROOT = iphoneos;
				SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
				SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE;
				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
				SWIFT_VERSION = 3.0;
				USE_HEADERMAP = NO;
			};
			name = Debug;
		};
		OBJ_4 /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				COMBINE_HIDPI_IMAGES = YES;
				COPY_PHASE_STRIP = YES;
				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
				DYLIB_INSTALL_NAME_BASE = "@rpath";
				GCC_OPTIMIZATION_LEVEL = s;
				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
				MACOSX_DEPLOYMENT_TARGET = 10.10;
				OTHER_SWIFT_FLAGS = "-DXcode";
				PRODUCT_NAME = "$(TARGET_NAME)";
				SDKROOT = iphoneos;
				SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
				SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE;
				SWIFT_OPTIMIZATION_LEVEL = "-O";
				SWIFT_VERSION = 3.0;
				USE_HEADERMAP = NO;
			};
			name = Release;
		};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
		OBJ_18 /* Build configuration list for PBXNativeTarget "PCLBlurEffectAlert" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				OBJ_19 /* Debug */,
				OBJ_20 /* Release */,
			);
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Debug;
		};
		OBJ_2 /* Build configuration list for PBXProject "PCLBlurEffectAlert" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				OBJ_3 /* Debug */,
				OBJ_4 /* Release */,
			);
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Debug;
		};
/* End XCConfigurationList section */
	};
	rootObject = OBJ_1 /* Project object */;
}


================================================
FILE: PCLBlurEffectAlert.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
   version = "1.0">
   <FileRef
      location = "self:">
   </FileRef>
</Workspace>


================================================
FILE: PCLBlurEffectAlert.xcodeproj/xcshareddata/xcschemes/PCLBlurEffectAlert.xcscheme
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
   LastUpgradeVersion = "9999"
   version = "1.3">
   <BuildAction
      parallelizeBuildables = "YES"
      buildImplicitDependencies = "YES">
      <BuildActionEntries>
         <BuildActionEntry
            buildForTesting = "YES"
            buildForRunning = "YES"
            buildForProfiling = "YES"
            buildForArchiving = "YES"
            buildForAnalyzing = "YES">
            <BuildableReference
               BuildableIdentifier = "primary"
               BlueprintIdentifier = "OBJ_17"
               BuildableName = "PCLBlurEffectAlert.framework"
               BlueprintName = "PCLBlurEffectAlert"
               ReferencedContainer = "container:PCLBlurEffectAlert.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 = "OBJ_24"
               BuildableName = "PCLBlurEffectAlertTests.xctest"
               BlueprintName = "PCLBlurEffectAlertTests"
               ReferencedContainer = "container:PCLBlurEffectAlert.xcodeproj">
            </BuildableReference>
         </TestableReference>
      </Testables>
      <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">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "OBJ_17"
            BuildableName = "PCLBlurEffectAlert.framework"
            BlueprintName = "PCLBlurEffectAlert"
            ReferencedContainer = "container:PCLBlurEffectAlert.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
      <AdditionalOptions>
      </AdditionalOptions>
   </LaunchAction>
   <ProfileAction
      buildConfiguration = "Release"
      shouldUseLaunchSchemeArgsEnv = "YES"
      savedToolIdentifier = ""
      useCustomWorkingDirectory = "NO"
      debugDocumentVersioning = "YES">
   </ProfileAction>
   <AnalyzeAction
      buildConfiguration = "Debug">
   </AnalyzeAction>
   <ArchiveAction
      buildConfiguration = "Release"
      revealArchiveInOrganizer = "YES">
   </ArchiveAction>
</Scheme>


================================================
FILE: PCLBlurEffectAlert.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
  <key>SchemeUserState</key>
  <dict>
    <key>PCLBlurEffectAlert.xcscheme</key>
    <dict></dict>
  </dict>
  <key>SuppressBuildableAutocreation</key>
  <dict></dict>
</dict>
</plist>


================================================
FILE: Package.swift
================================================
import PackageDescription

let package = Package(
    name: "PCLBlurEffectAlert",
    targets: [],
    dependencies: [
        .Package(url: "https://github.com/hryk224/PCLBlurEffectAlert", majorVersion: 2),
        ]
)


================================================
FILE: README.md
================================================
# PCLBlurEffectAlert

Swift AlertController, use UIVisualeffectview

[![Cocoapods Compatible](http://img.shields.io/cocoapods/v/PCLBlurEffectAlert.svg?style=flat)](http://cocoadocs.org/docsets/PCLBlurEffectAlert)
[![Swift 3.0](https://img.shields.io/badge/Swift-3.0-orange.svg?style=flat)](https://developer.apple.com/swift/)

<img src="https://raw.githubusercontent.com/wiki/hryk224/PCLBlurEffectAlert/images/sample1.gif" width="320" > <img src="https://raw.githubusercontent.com/wiki/hryk224/PCLBlurEffectAlert/images/sample2.gif" width="320" >

<img src="https://raw.githubusercontent.com/wiki/hryk224/PCLBlurEffectAlert/images/sample3.gif" width="320" > <img src="https://raw.githubusercontent.com/wiki/hryk224/PCLBlurEffectAlert/images/sample4.gif" width="320" >

<img src="https://raw.githubusercontent.com/wiki/hryk224/PCLBlurEffectAlert/images/sample5.gif" width="320" >

## Requirements
- iOS 8.0+
- Swift 3.0+
- ARC

## Feature
- [x] Change color
- [x] Change effect
- [x] Change font
- [x] Use UITextField
- [x] Use UIImageView

## install

#### Cocoapods

Adding the following to your `Podfile` and running `pod install`:

```Ruby
use_frameworks!
pod "PCLBlurEffectAlert"
```

### import

```Swift
import PCLBlurEffectAlert
```

## Initialize

#### UIBlurEffect

```Swift
// Default effect: UIBlurEffect(style: .extraLight)
convenience init(title: String?, message: String?, effect: UIBlurEffect, style: PCLBlurEffectAlert.ControllerStyle)
```

`style` => `alert`, `alertVertical`, `actionSheet`

When `actions` count becomes more than 3, `alert` and `alertVertical` is the same as.

## Usage

#### Example

```Swift
let alertController = PCLBlurEffectAlertController(title: "How are you doing?", 
                                                  message: "Press a button!",
                                                  effect: UIBlurEffect(style: .lightdark)
                                                  style: .alert)'
// Customize if needed
alertController.configure(titleColor: .white)
alertController.configure(buttonFont: [.default: UIFont.systemFont(ofSize: 24),
                                       .destructive: UIFont.boldSystemFont(ofSize: 20),
                                       .cancel: UIFont.systemFont(ofSize: 14)])

// Adds ImageView
alertController.addImageView(with: <image files>)

// Adds TextField
alertController.addTextField()

// Adds actions
let action = PCLBlurEffectAlertAction(title: "I’m fine.", style: .default) { _ in }
let cancelAction = PCLBlurEffectAlertAction(title: "Not so good.", style: .cancel) { _ in }
alertController.addAction(action)
alertController.addAction(cancelAction)

// Presented
alertController.show() // or present(alertController, animated: true, completion: nil)
```

#### Sources

```Swift
// Adds Actions
open func addAction(_ action: PCLBlurEffectAlertAction)
// Adds ImageView
open func addImageView(with image: UIImage, configurationHandler: ((UIImageView?) -> Void)? = nil)
// Adds TextFields
open func addTextField(with configurationHandler: ((UITextField?) -> Void)? = nil)
// Presented
open func show()
```

## Customize

```Swift
// Default ActionSheet: UIScreen.main.bounds.width - (margin * 2)
// Default Alert: 320 - (margin * 2)
func configure(alertViewWidth: CGFloat)

// Default: 4
func configure(cornerRadius: CGFloat)
// Default: 1 / UIScreen.main.scale
func configure(thin: CGFloat)
// Default: 8
func configure(margin: CGFloat)

/// Color
// Default: UIColor.black.withAlphaComponent(0.3)
func configure(overlayBackgroundColor: UIColor)
// Default: .clear
func configure(backgroundColor: UIColor)

/// Text
// Default: .boldSystemFont(ofSize: 16)
// Default: .black
func configure(titleFont: UIFont, titleColor: UIColor)
// Default: .systemFont(ofSize: 14)
// Default: .black
func configure(messageFont: UIFont, messageColor: UIColor)
// Default: 
// .default: UIFont.systemFont(ofSize: 16),
// .cancel: UIFont.systemFont(ofSize: 16),
// .destructive: UIFont.systemFont(ofSize: 16)
func configure(buttonFont: [PCLBlurEffectAlert.ActionStyle : UIFont])
// Default: 
// .default: .black,
// .cancel: .black,
// .destructive: .red
func configure(buttonTextColor: [PCLBlurEffectAlert.ActionStyle : UIColor])
// Default: 
// .default: .gray,
// .cancel: .gray,
// .destructive: .gray
func configure(buttonDisableTextColor: [PCLBlurEffectAlert.ActionStyle : UIColor])

/// Button
// Default: 44
func configure(buttonHeight: CGFloat)
// Default: .clear
func configure(buttonBackgroundColor: UIColor)

// Default: 32
func configure(textFieldHeight: CGFloat)
// Default: UIColor.white.withAlphaComponent(0.1)
func configure(textFieldsViewBackgroundColor: UIColor)
// Default: UIColor.black.withAlphaComponent(0.15)
func configure(textFieldBorderColor: UIColor)

```

## More Examples

```Swift
let alertController = PCLBlurEffectAlertController(title: "How are you doing?", 
                                                  message: "Press a button!",
                                                  style: .alert)
let action1 = PCLBlurEffectAlertAction(title: "I’m fine.", style: .default) { _ in }
let action2 = PCLBlurEffectAlertAction(title: "Not so good.", style: .default) { _ in }
alertController.addAction(action1)
alertController.addAction(action2)
alertController.show()
```

<img src="https://raw.githubusercontent.com/wiki/hryk224/PCLBlurEffectAlert/images/sample1.png" width="320" >

```Swift
let alertController = PCLBlurEffectAlertController(title: "title title title title title title title",
                                                  message: "message message message message message",
                                                  effect: UIBlurEffect(style: .light),
                                                  style: .alert)
alertController.addTextField { _ in }
alertController.addTextField { _ in }
alertController.configure(textFieldsViewBackgroundColor: UIColor.white.withAlphaComponent(0.1))
alertController.configure(textFieldBorderColor: .black)
alertController.configure(buttonDisableTextColor: [.default: .lightGray, .destructive: .lightGray])
let action1 = PCLBlurEffectAlertAction(title: "Default", style: .default) { _ in }
let action2 = PCLBlurEffectAlertAction(title: "Destructive", style: .destructive) { _ in }
let cancelAction = PCLBlurEffectAlertAction(title: "Cancel", style: .cancel) { _ in }
alertController.addAction(action1)
alertController.addAction(action2)
alertController.addAction(cancelAction)
alertController.show()
```

<img src="https://raw.githubusercontent.com/wiki/hryk224/PCLBlurEffectAlert/images/sample2.png" width="320" >

```Swift
let alertController = PCLBlurEffectAlertController(title: "How are you doing?", 
                                                  message: "Press a button!",
                                                  effect: UIBlurEffect(style: .dark),
                                                  style: .actionSheet)
let action1 = PCLBlurEffectAlertAction(title: "I’m fine.", style: .default) { _ in }
let action2 = PCLBlurEffectAlertAction(title: "Not so good.", style: .default) { _ in }
alertController.addAction(action1)
alertController.addAction(action2)
alertController.show()
```

<img src="https://raw.githubusercontent.com/wiki/hryk224/PCLBlurEffectAlert/images/sample3.png" width="320" >

```Swift
let alertController = PCLBlurEffectAlertController(title: "title title title title title title title",
                                                  message: "message message message message message",
                                                  style: .actionSheet)
alertController.addTextField()
alertController.addTextField()
alertController.configure(textFieldsViewBackgroundColor: UIColor.white.withAlphaComponent(0.1))
alertController.configure(textFieldBorderColor: .black)
alertController.configure(buttonDisableTextColor: [.default: .lightGray, .destructive: .lightGray])
let action1 = PCLBlurEffectAlertAction(title: "Default", style: .default) { _ in }
let action2 = PCLBlurEffectAlertAction(title: "Destructive", style: .destructive) { _ in }
let cancelAction = PCLBlurEffectAlertAction(title: "Cancel", style: .cancel) { _ in }
alertController.addAction(action1)
alertController.addAction(action2)
alertController.addAction(cancelAction)
alertController.show()
```

<img src="https://raw.githubusercontent.com/wiki/hryk224/PCLBlurEffectAlert/images/sample4.png" width="320" >

```Swift
let alertController = PCLBlurEffectAlertController(title: "title title title title title title title",
                                                    message: "message message message message message",
                                                    style: .alert)
alertController.addImageView(with: UIImage(named: "cat")!)
let catAction = PCLBlurEffectAlertAction(title: "Cat?", style: .default) { _ in
    print("You pressed Cat?")
}
let dogAction = PCLBlurEffectAlertAction(title: "Dog?", style: .default) { _ in
    print("You pressed Dog?")
}
alertController.addAction(catAction)
alertController.addAction(dogAction)
alertController.show()
```

<img src="https://raw.githubusercontent.com/wiki/hryk224/PCLBlurEffectAlert/images/sample5.png" width="320" >

## Photos from

* by [pakutaso.com](https://www.pakutaso.com/)
* by [FLATICON](http://www.flaticon.com/)

## Acknowledgements

* Inspired by [DOAlertController](https://github.com/okmr-d/DOAlertController) in [okmr-d](https://github.com/okmr-d).

## License

This project is made available under the MIT license. See LICENSE file for details.


================================================
FILE: Sources/PCLBlurEffectAlert+Action.swift
================================================
//
//  PCLBlurEffectAlert+Action.swift
//  PCLBlurEffectAlert
//
//  Created by yoshida hiroyuki on 2016/09/15.
//  Copyright © 2016年 hiroyuki yoshida. All rights reserved.
//

import UIKit

public typealias PCLBlurEffectAlertAction = PCLBlurEffectAlert.Action

extension PCLBlurEffectAlert {
    open class Action {
        var tag: Int = -1
        var title: String?
        open var style: PCLBlurEffectAlert.ActionStyle
        var handler: ((PCLBlurEffectAlert.Action?) -> Void)?
        var button: UIButton!
        var visualEffectView: UIVisualEffectView?
        lazy var backgroundView: UIView = {
           return UIView()
        }()
        open var isEnabled: Bool = true {
            didSet {
                guard oldValue != isEnabled else { return }
                PCLBlurEffectAlert.NotificationManager.shared.postAlertActionEnabledDidChangeNotification()
            }
        }
        public init(title: String,
                    style: PCLBlurEffectAlert.ActionStyle,
                    handler: ((PCLBlurEffectAlert.Action?) -> Void)?) {
            self.title = title
            self.style = style
            self.handler = handler
            let button = UIButton(type: .custom)
            button.tag = tag
            button.adjustsImageWhenHighlighted = false
            button.adjustsImageWhenDisabled = false
            button.layer.masksToBounds = true
            button.setTitle(title, for: .normal)
            button.titleLabel?.numberOfLines = 1
            button.titleLabel?.lineBreakMode = .byTruncatingTail
            button.titleLabel?.textAlignment = .center
            self.button = button
        }
    }
}


================================================
FILE: Sources/PCLBlurEffectAlert+Controller.swift
================================================
//
//  PCLBlurEffectAlert+Controller.swift
//  PCLBlurEffectAlert
//
//  Created by yoshida hiroyuki on 2016/09/15.
//  Copyright © 2016年 hiroyuki yoshida. All rights reserved.
//

import UIKit

public typealias PCLBlurEffectAlertController = PCLBlurEffectAlert.Controller

extension PCLBlurEffectAlert {
    open class Controller: UIViewController {
        // Property
        fileprivate var isNeedlayout = true
        fileprivate var message: String?
        fileprivate var textField: UITextField?
        fileprivate var imageView: UIImageView?
        var style: PCLBlurEffectAlert.ControllerStyle = .actionSheet
        fileprivate var effect: UIBlurEffect = UIBlurEffect(style: .extraLight)
        
        // Actions
        open fileprivate(set) var actions: [PCLBlurEffectAlertAction] = []
        fileprivate var cancelAction: PCLBlurEffectAlertAction?
        fileprivate var cancelActionTag: Int?
        fileprivate var keyboardHeight: CGFloat = 0
        
        // TextFields
        fileprivate var textFields: [UITextField] = []
        
        // Getter
        fileprivate var isActionSheet: Bool { return style == .actionSheet }
        fileprivate var isAlert: Bool { return style == .alert }
        fileprivate var isAlertVertical: Bool { return style == .alertVertical }
        fileprivate var hasTitle: Bool { return title?.isEmpty == false }
        fileprivate var hasMessage: Bool { return message?.isEmpty == false }
        fileprivate var hasImageView: Bool { return imageView != nil }
        fileprivate var hasTextField: Bool { return !textFields.isEmpty }
        
        // OverlayView
        let overlayView = UIView()
        fileprivate let tapGestureRecognizer = UITapGestureRecognizer()
        // ContainerView
        let containerView = RespondsView()
        fileprivate var containerViewBottomLayoutConstraint: NSLayoutConstraint!
        // AlertView
        let alertView = UIView()
        fileprivate var alertViewWidthConstraint: NSLayoutConstraint!
        fileprivate var alertViewHeightConstraint: NSLayoutConstraint!
        // CornerView
        let cornerView = UIView()
        fileprivate var cornerViewHeightConstraint: NSLayoutConstraint!
        // textAreaView
        fileprivate let textAreaView = UIView()
        fileprivate var textAreaHeight: CGFloat = 0
        fileprivate var textAreaViewHeightConstraint: NSLayoutConstraint!
        fileprivate var textAreaVisualEffectView: UIVisualEffectView!
        fileprivate var textAreaVisualEffectViewHeightConstraint: NSLayoutConstraint!
        fileprivate let textAreaBackgroundView = UIView()
        fileprivate var textAreaBackgroundViewHeightConstraint: NSLayoutConstraint!
        // titleLabel
        fileprivate let titleLabel = UILabel()
        // messageLabel
        fileprivate let messageLabel = UILabel()
        
        // Customize
        fileprivate var alertViewWidth: CGFloat = 0
        fileprivate var cornerRadius: CGFloat = 0
        fileprivate var thin: CGFloat = 1 / UIScreen.main.scale
        fileprivate var margin: CGFloat = 8
        fileprivate var overlayBackgroundColor: UIColor = UIColor.black.withAlphaComponent(0.3)
        fileprivate var backgroundColor: UIColor = .clear
        fileprivate var buttonBackgroundColor: UIColor = .clear
        fileprivate var textFieldsViewBackgroundColor: UIColor = UIColor.white.withAlphaComponent(0.1)
        fileprivate var titleFont: UIFont = .boldSystemFont(ofSize: 16)
        fileprivate var titleColor: UIColor = .black
        fileprivate var messageFont: UIFont = .systemFont(ofSize: 14)
        fileprivate var messageColor: UIColor = .black
        fileprivate var buttonFont: [PCLBlurEffectAlert.ActionStyle : UIFont] = [
            .default: UIFont.systemFont(ofSize: 16),
            .cancel: UIFont.systemFont(ofSize: 16),
            .destructive: UIFont.systemFont(ofSize: 16)
        ]
        fileprivate var buttonTextColor: [PCLBlurEffectAlert.ActionStyle : UIColor] = [
            .default: .black,
            .cancel: .black,
            .destructive: .red
        ]
        fileprivate var buttonDisableTextColor: [PCLBlurEffectAlert.ActionStyle : UIColor] = [
            .default: .gray,
            .cancel: .gray,
            .destructive: .gray
        ]
        fileprivate var textFieldHeight: CGFloat = 32
        fileprivate var textFieldBorderColor = UIColor.black.withAlphaComponent(0.15)
        fileprivate var buttonHeight: CGFloat = 44
        
        private var tintColor: UIColor {
            return view.tintColor
        }
        
        open override var prefersStatusBarHidden: Bool {
            return presentingViewController?.prefersStatusBarHidden ?? super.prefersStatusBarHidden
        }
        
        public convenience init(title: String?,
                                message: String?,
                                effect: UIBlurEffect = UIBlurEffect(style: .extraLight),
                                style: PCLBlurEffectAlert.ControllerStyle) {
            self.init(nibName: nil, bundle: nil)
            self.title = title
            self.message = message
            self.style = style
            self.effect = effect
            self.textAreaVisualEffectView = UIVisualEffectView(effect: effect) as UIVisualEffectView
            
            // NotificationCenter
            PCLBlurEffectAlert.NotificationManager.shared.addAlertActionEnabledDidChangeNotificationObserver(self)
            PCLBlurEffectAlert.NotificationManager.shared.addKeyboardNotificationObserver(self)
            
            modalPresentationStyle = .overCurrentContext
            transitioningDelegate = self
            view.frame.size = UIScreen.main.bounds.size
            overlayView.frame = UIScreen.main.bounds
            view.insertSubview(overlayView, at: 0)
            view.addSubview(containerView)
            
            containerView.delegate = self
            containerView.addSubview(alertView)
            
            cornerView.addSubview(textAreaBackgroundView)
            cornerView.addSubview(textAreaVisualEffectView)
            cornerView.addSubview(textAreaView)
            
            alertView.addSubview(cornerView)
            switch style {
            case .actionSheet:
                alertViewWidth = UIScreen.main.bounds.width - (margin * 2)
            default:
                alertViewWidth = 320 - (margin * 2)
            }
            cornerRadius = 4
            buttonTextColor[.default] = tintColor
            buttonTextColor[.cancel] = tintColor
            configureConstraints()
        }
        deinit {
            PCLBlurEffectAlert.NotificationManager.shared.removeAlertActionEnabledDidChangeNotificationObserver(self)
            PCLBlurEffectAlert.NotificationManager.shared.removeKeyboardNotificationObserver(self)
        }
        // layout
        open override func viewWillAppear(_ animated: Bool) {
            super.viewWillAppear(animated)
            adjustLayout()
        }
    }
}

// MARK: - User Setting
extension PCLBlurEffectAlertController {
    //    ActionSheet: var alertViewWidth: CGFloat = UIScreen.main.bounds.width - (margin * 2)
    //    Alert: var alertViewWidth = 320 - (margin * 2)
    open func configure(alertViewWidth: CGFloat) {
        self.alertViewWidth = alertViewWidth
    }
    //    var cornerRadius: CGFloat = 0
    open func configure(cornerRadius: CGFloat) {
        self.cornerRadius = cornerRadius
    }
    //    var thin: CGFloat = 1 / UIScreen.main.scale
    open func configure(thin: CGFloat) {
        self.thin = thin
    }
    //    var margin: CGFloat = 8
    open func configure(margin: CGFloat) {
        self.margin = margin
    }
    //    var backgroundColor = .clear
    open func configure(backgroundColor: UIColor) {
        self.backgroundColor = backgroundColor
    }
    //    var buttonBackgroundColor = .clear
    open func configure(buttonBackgroundColor: UIColor) {
        self.buttonBackgroundColor = buttonBackgroundColor
    }
    //    var overlayBackgroundColor = UIColor.black.withAlphaComponent(0.3)
    open func configure(overlayBackgroundColor: UIColor) {
        self.overlayBackgroundColor = overlayBackgroundColor
    }
    //    var textFieldsViewBackgroundColor = UIColor.white.withAlphaComponent(0.1)
    open func configure(textFieldsViewBackgroundColor: UIColor) {
        self.textFieldsViewBackgroundColor = textFieldsViewBackgroundColor
    }
    //    var titleFont = UIFont.boldSystemFont(ofSize: 16)
    //    var titleColor: UIColor = .brown
    open func configure(titleFont: UIFont) {
        self.titleFont = titleFont
    }
    open func configure(titleColor: UIColor) {
        self.titleColor = titleColor
    }
    open func configure(titleFont: UIFont, titleColor: UIColor) {
        self.titleFont = titleFont
        self.titleColor = titleColor
    }
    //    var messageFont = UIFont.systemFont(ofSize: 14)
    //    var messageColor: UIColor = .black
    open func configure(messageFont: UIFont) {
        self.messageFont = messageFont
    }
    open func configure(messageColor: UIColor) {
        self.messageColor = messageColor
    }
    open func configure(messageFont: UIFont, messageColor: UIColor) {
        self.messageFont = messageFont
        self.messageColor = messageColor
    }
    //    var buttonFont: [PCLBlurEffectAlert.ActionStyle : UIFont] = [
    //        .default: UIFont.systemFont(ofSize: 16),
    //        .cancel: UIFont.systemFont(ofSize: 16),
    //        .destructive: UIFont.systemFont(ofSize: 16)
    //    ]
    //    var buttonTextColor: [PCLBlurEffectAlert.ActionStyle : UIColor] = [
    //        .default: .black,
    //        .cancel: .gray,
    //        .destructive: .red
    //    ]
    //    var buttonDisableTextColor: [PCLBlurEffectAlert.ActionStyle : UIColor] = [
    //        .default: .black,
    //        .cancel: .black,
    //        .destructive: .red
    //    ]
    open func configure(buttonFont font: [PCLBlurEffectAlert.ActionStyle : UIFont]? = nil,
                        buttonTextColor textColor: [PCLBlurEffectAlert.ActionStyle : UIColor]? = nil,
                        buttonDisableTextColor disableTextColor: [PCLBlurEffectAlert.ActionStyle : UIColor]? = nil) {
        if let font = font?[.default] {
            self.buttonFont[.default] = font
        }
        if let font = font?[.destructive] {
            self.buttonFont[.destructive] = font
        }
        if let font = font?[.cancel] {
            self.buttonFont[.cancel] = font
        }
        if let textColor = textColor?[.default] {
            self.buttonTextColor[.default] = textColor
        }
        if let textColor = textColor?[.destructive] {
            self.buttonTextColor[.destructive] = textColor
        }
        if let textColor = textColor?[.cancel] {
            self.buttonTextColor[.cancel] = textColor
        }
        if let textColor = disableTextColor?[.default] {
            self.buttonDisableTextColor[.default] = textColor
        }
        if let textColor = disableTextColor?[.destructive] {
            self.buttonDisableTextColor[.destructive] = textColor
        }
        if let textColor = disableTextColor?[.cancel] {
            self.buttonDisableTextColor[.cancel] = textColor
        }
    }
    //    var textFieldHeight: CGFloat = 32
    open func configure(textFieldHeight: CGFloat) {
        self.textFieldHeight = textFieldHeight
    }
    //    var textFieldBorderColor = UIColor.black.withAlphaComponent(0.15)
    open func configure(textFieldBorderColor: UIColor) {
        self.textFieldBorderColor = textFieldBorderColor
    }
    //    var buttonHeight: CGFloat = 44
    open func configure(buttonHeight: CGFloat) {
        self.buttonHeight = buttonHeight
    }
    // Adds Action
    open func addAction(_ action: PCLBlurEffectAlertAction) {
        // Error
        if action.style.isCancel && actions.filter({ $0.style.isCancel }).count > 0 {
            fatalError("Can not be used plurality cancel button")
        }
        action.tag = actions.count
        action.button?.tag = action.tag
        if action.style.isCancel {
            cancelAction = action
            cancelActionTag = action.tag
        }
        actions.append(action)
        action.button?.setTitle(action.title, for: .normal)
        action.button?.isEnabled = action.isEnabled
        action.visualEffectView = UIVisualEffectView(effect: effect) as UIVisualEffectView
        action.visualEffectView?.isUserInteractionEnabled = false
    }
    // Adds TextFields
    open func addTextField(with configurationHandler: ((UITextField?) -> Void)? = nil) {
        let textField = UITextField()
        textField.backgroundColor = .clear
        configurationHandler?(textField)
        textFields.append(textField)
    }
    // Adds ImageView
    open func addImageView(with image: UIImage, configurationHandler: ((UIImageView?) -> Void)? = nil) {
        let imageView = UIImageView()
        imageView.contentMode = .scaleAspectFill
        imageView.clipsToBounds = true
        imageView.backgroundColor = .clear
        imageView.image = image
        configurationHandler?(imageView)
        self.imageView = imageView
    }
    // show
    open func show() {
        DispatchQueue.main.async {
            UIApplication.shared.topViewController?.present(self, animated: true, completion: nil)
        }
    }
}

// MARK: - Private
private extension PCLBlurEffectAlertController {
    func configureConstraints() {
        configureContainerViewConstraints()
        configureAlertViewConstraints()
        configureCornerViewConstraints()
        configureTextAreaViewConstraints()
    }
    func configureContainerViewConstraints() {
        containerView.translatesAutoresizingMaskIntoConstraints = false
        let topConstraint = NSLayoutConstraint(item: containerView,
                                               attribute: .top,
                                               relatedBy: .equal,
                                               toItem: view,
                                               attribute: .top,
                                               multiplier: 1,
                                               constant: 0)
        let rightConstraint = NSLayoutConstraint(item: containerView,
                                                 attribute: .right,
                                                 relatedBy: .equal,
                                                 toItem: view,
                                                 attribute: .right,
                                                 multiplier: 1,
                                                 constant: 0)
        let leftConstraint = NSLayoutConstraint(item: containerView,
                                                attribute: .left,
                                                relatedBy: .equal,
                                                toItem: view,
                                                attribute: .left,
                                                multiplier: 1,
                                                constant: 0)
        containerViewBottomLayoutConstraint = NSLayoutConstraint(item: containerView,
                                                                 attribute: .bottom,
                                                                 relatedBy: .equal,
                                                                 toItem: view,
                                                                 attribute: .bottom,
                                                                 multiplier: 1,
                                                                 constant: 0)
        view.addConstraints([topConstraint,
                             rightConstraint,
                             leftConstraint,
                             containerViewBottomLayoutConstraint])
    }
    func configureAlertViewConstraints() {
        alertView.translatesAutoresizingMaskIntoConstraints = false
        switch style {
        case .actionSheet:
            let centerXConstraint = NSLayoutConstraint(item: alertView,
                                                       attribute: .centerX,
                                                       relatedBy: .equal,
                                                       toItem: containerView,
                                                       attribute: .centerX,
                                                       multiplier: 1,
                                                       constant: 0)
            let bottomConstraint = NSLayoutConstraint(item: alertView,
                                                      attribute: .bottom,
                                                      relatedBy: .equal,
                                                      toItem: containerView,
                                                      attribute: .bottom,
                                                      multiplier: 1,
                                                      constant: -(margin))
            alertViewWidthConstraint = NSLayoutConstraint(item: alertView,
                                                          attribute: .width,
                                                          relatedBy: .equal,
                                                          toItem: nil,
                                                          attribute: .width,
                                                          multiplier: 1,
                                                          constant: alertViewWidth)
            alertViewHeightConstraint = NSLayoutConstraint(item: alertView,
                                                           attribute: .height,
                                                           relatedBy: .equal,
                                                           toItem: nil,
                                                           attribute: .height,
                                                           multiplier: 1,
                                                           constant: 0)
            containerView.addConstraints([centerXConstraint,
                                          bottomConstraint,
                                          alertViewWidthConstraint,
                                          alertViewHeightConstraint])
        default:
            let centerXConstraint = NSLayoutConstraint(item: alertView, attribute: .centerX, relatedBy: .equal, toItem: containerView, attribute: .centerX, multiplier: 1, constant: 0)
            let centerYConstraint = NSLayoutConstraint(item: alertView, attribute: .centerY, relatedBy: .equal, toItem: containerView, attribute: .centerY, multiplier: 1, constant: 0)
            alertViewWidthConstraint = NSLayoutConstraint(item: alertView, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .width, multiplier: 1, constant: alertViewWidth)
            alertViewHeightConstraint = NSLayoutConstraint(item: alertView, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .height, multiplier: 1, constant: 0)
            containerView.addConstraints([centerXConstraint,
                                          centerYConstraint,
                                          alertViewWidthConstraint,
                                          alertViewHeightConstraint])
        }
    }
    func configureCornerViewConstraints() {
        cornerView.translatesAutoresizingMaskIntoConstraints = false
        switch style {
        case .actionSheet:
            let topConstraint = NSLayoutConstraint(item: cornerView,
                                                   attribute: .top,
                                                   relatedBy: .equal,
                                                   toItem: alertView,
                                                   attribute: .top,
                                                   multiplier: 1,
                                                   constant: 0)
            let rightConstraint = NSLayoutConstraint(item: cornerView,
                                                     attribute: .right,
                                                     relatedBy: .equal,
                                                     toItem: alertView,
                                                     attribute: .right,
                                                     multiplier: 1,
                                                     constant: 0)
            let leftConstraint = NSLayoutConstraint(item: cornerView,
                                                    attribute: .left,
                                                    relatedBy: .equal,
                                                    toItem: alertView,
                                                    attribute: .left,
                                                    multiplier: 1,
                                                    constant: 0)
            cornerViewHeightConstraint = NSLayoutConstraint(item: cornerView,
                                                            attribute: .height,
                                                            relatedBy: .equal,
                                                            toItem: nil,
                                                            attribute: .height,
                                                            multiplier: 1,
                                                            constant: 0)
            alertView.addConstraints([topConstraint, rightConstraint, leftConstraint, cornerViewHeightConstraint])
        default:
            let topConstraint = NSLayoutConstraint(item: cornerView,
                                                   attribute: .top,
                                                   relatedBy: .equal,
                                                   toItem: alertView,
                                                   attribute: .top,
                                                   multiplier: 1,
                                                   constant: 0)
            let rightConstraint = NSLayoutConstraint(item: cornerView,
                                                     attribute: .right,
                                                     relatedBy: .equal,
                                                     toItem: alertView,
                                                     attribute: .right,
                                                     multiplier: 1,
                                                     constant: 0)
            let leftConstraint = NSLayoutConstraint(item: cornerView,
                                                    attribute: .left,
                                                    relatedBy: .equal,
                                                    toItem: alertView,
                                                    attribute: .left,
                                                    multiplier: 1,
                                                    constant: 0)
            let bottomLayoutConstraint = NSLayoutConstraint(item: cornerView,
                                                            attribute: .bottom,
                                                            relatedBy: .equal,
                                                            toItem: alertView,
                                                            attribute: .bottom,
                                                            multiplier: 1,
                                                            constant: 0)
            alertView.addConstraints([topConstraint,
                                      rightConstraint,
                                      leftConstraint,
                                      bottomLayoutConstraint])
        }
    }
    func configureTextAreaViewConstraints() {
        textAreaView.translatesAutoresizingMaskIntoConstraints = false
        textAreaVisualEffectView.translatesAutoresizingMaskIntoConstraints = false
        textAreaBackgroundView.translatesAutoresizingMaskIntoConstraints = false
        
        let textAreaViewTopConstraint = NSLayoutConstraint(item: textAreaView,
                                                           attribute: .top,
                                                           relatedBy: .equal,
                                                           toItem: cornerView,
                                                           attribute: .top,
                                                           multiplier: 1,
                                                           constant: 0)
        let textAreaViewRightConstraint = NSLayoutConstraint(item: textAreaView,
                                                             attribute: .right,
                                                             relatedBy: .equal,
                                                             toItem: cornerView,
                                                             attribute: .right,
                                                             multiplier: 1,
                                                             constant: 0)
        let textAreaViewLeftConstraint = NSLayoutConstraint(item: textAreaView,
                                                            attribute: .left,
                                                            relatedBy: .equal,
                                                            toItem: cornerView,
                                                            attribute: .left,
                                                            multiplier: 1,
                                                            constant: 0)
        textAreaViewHeightConstraint = NSLayoutConstraint(item: textAreaView,
                                                          attribute: .height,
                                                          relatedBy: .equal,
                                                          toItem: nil,
                                                          attribute: .height,
                                                          multiplier: 1,
                                                          constant: 0)
        cornerView.addConstraints([textAreaViewTopConstraint,
                                   textAreaViewRightConstraint,
                                   textAreaViewLeftConstraint,
                                   textAreaViewHeightConstraint])
        
        let textAreaVisualEffectViewTopConstraint = NSLayoutConstraint(item: textAreaVisualEffectView,
                                                                       attribute: .top,
                                                                       relatedBy: .equal,
                                                                       toItem: cornerView,
                                                                       attribute: .top,
                                                                       multiplier: 1,
                                                                       constant: 0)
        let textAreaVisualEffectViewRightConstraint = NSLayoutConstraint(item: textAreaVisualEffectView,
                                                                         attribute: .right,
                                                                         relatedBy: .equal,
                                                                         toItem: cornerView,
                                                                         attribute: .right,
                                                                         multiplier: 1,
                                                                         constant: 0)
        let textAreaVisualEffectViewLeftConstraint = NSLayoutConstraint(item: textAreaVisualEffectView,
                                                                        attribute: .left,
                                                                        relatedBy: .equal,
                                                                        toItem: cornerView,
                                                                        attribute: .left,
                                                                        multiplier: 1,
                                                                        constant: 0)
        textAreaVisualEffectViewHeightConstraint = NSLayoutConstraint(item: textAreaVisualEffectView,
                                                                      attribute: .height,
                                                                      relatedBy: .equal,
                                                                      toItem: nil,
                                                                      attribute: .height,
                                                                      multiplier: 1,
                                                                      constant: 0)
        cornerView.addConstraints([textAreaVisualEffectViewTopConstraint,
                                   textAreaVisualEffectViewRightConstraint,
                                   textAreaVisualEffectViewLeftConstraint,
                                   textAreaVisualEffectViewHeightConstraint])
        
        let textAreaBackgroundViewTopConstraint = NSLayoutConstraint(item: textAreaBackgroundView,
                                                                     attribute: .top,
                                                                     relatedBy: .equal,
                                                                     toItem: cornerView,
                                                                     attribute: .top,
                                                                     multiplier: 1,
                                                                     constant: 0)
        let textAreaBackgroundViewRightConstraint = NSLayoutConstraint(item: textAreaBackgroundView,
                                                                       attribute: .right,
                                                                       relatedBy: .equal,
                                                                       toItem: cornerView,
                                                                       attribute: .right,
                                                                       multiplier: 1,
                                                                       constant: 0)
        let textAreaBackgroundViewLeftConstraint = NSLayoutConstraint(item: textAreaBackgroundView,
                                                                      attribute: .left,
                                                                      relatedBy: .equal,
                                                                      toItem: cornerView,
                                                                      attribute: .left,
                                                                      multiplier: 1,
                                                                      constant: 0)
        textAreaBackgroundViewHeightConstraint = NSLayoutConstraint(item: textAreaBackgroundView,
                                                                    attribute: .height,
                                                                    relatedBy: .equal,
                                                                    toItem: nil,
                                                                    attribute: .height,
                                                                    multiplier: 1,
                                                                    constant: 0)
        cornerView.addConstraints([textAreaBackgroundViewTopConstraint,
                                   textAreaBackgroundViewRightConstraint,
                                   textAreaBackgroundViewLeftConstraint,
                                   textAreaBackgroundViewHeightConstraint])
    }
    func adjustLayout() {
        guard isNeedlayout else { return }
        isNeedlayout = false
        overlayView.backgroundColor = overlayBackgroundColor
        alertView.layer.cornerRadius = cornerRadius
        alertView.clipsToBounds = true
        alertViewWidthConstraint.constant = alertViewWidth
        cornerView.layer.cornerRadius = cornerRadius
        cornerView.clipsToBounds = true
        var textAreaPositionY: CGFloat = 0
        textAreaPositionY += (margin * 2)
        let textAreaWidth = alertViewWidth - (margin * 4)
        if hasTitle {
            titleLabel.frame.size = CGSize(width: textAreaWidth, height: 0)
            titleLabel.numberOfLines = 0
            titleLabel.textAlignment = .center
            titleLabel.font = titleFont
            titleLabel.textColor = titleColor
            titleLabel.text = title
            titleLabel.sizeToFit()
            titleLabel.frame = CGRect(x: margin * 2,
                                      y: textAreaPositionY,
                                      width: textAreaWidth,
                                      height: titleLabel.frame.height)
            textAreaView.addSubview(titleLabel)
            textAreaPositionY += titleLabel.frame.height
        }
        if hasMessage {
            if hasTitle {
                textAreaPositionY += margin
            }
            messageLabel.frame.size = CGSize(width: textAreaWidth, height: 0)
            messageLabel.numberOfLines = 0
            messageLabel.textAlignment = .center
            messageLabel.text = message
            messageLabel.font = messageFont
            messageLabel.textColor = messageColor
            messageLabel.sizeToFit()
            messageLabel.frame = CGRect(x: margin * 2,
                                        y: textAreaPositionY,
                                        width: textAreaWidth,
                                        height: messageLabel.frame.height)
            textAreaView.addSubview(messageLabel)
            textAreaPositionY += messageLabel.frame.height
        }
        if let imageView = imageView, let image = imageView.image { // hasImageView
            if hasTitle || hasMessage {
                textAreaPositionY += margin
            }
            let width = min(alertViewWidth - (margin * 2), image.size.width)
            let height = (width / image.size.width) * image.size.height
            let size = CGSize(width: width, height: height)
            imageView.frame = CGRect(x: (alertViewWidth - size.width) / 2,
                                     y: textAreaPositionY,
                                     width: size.width,
                                     height: size.height)
            textAreaView.addSubview(imageView)
            textAreaPositionY += imageView.frame.height
        }
        if hasTextField {
            if hasTitle || hasMessage || hasImageView {
                textAreaPositionY += margin
            }
            let textFieldsView = UIView()
            textFieldsView.backgroundColor = textFieldsViewBackgroundColor
            textFieldsView.layer.cornerRadius = (cornerRadius / 2)
            textFieldsView.clipsToBounds = true
            let textFieldsViewWidth = textAreaWidth
            var textFieldsViewHeight: CGFloat = 0
            textFieldsView.frame = CGRect(x: margin * 2,
                                          y: textAreaPositionY + margin,
                                          width: textFieldsViewWidth,
                                          height: textFieldsViewHeight)
            textFields.enumerated().forEach { index, textField in
                textField.frame = CGRect(x: margin,
                                         y: CGFloat(index) * textFieldHeight,
                                         width: textFieldsViewWidth - (2 * margin),
                                         height: textFieldHeight)
                textFieldsView.addSubview(textField)
                textFieldsViewHeight += textFieldHeight
                if index > 0 {
                    let topBorder = CALayer()
                    topBorder.frame = CGRect(x: -margin,
                                             y: 0,
                                             width: textFieldsViewWidth + (margin * 2),
                                             height: thin)
                    topBorder.backgroundColor = textFieldBorderColor.cgColor
                    textField.layer.sublayers = [topBorder]
                    textField.clipsToBounds = false
                }
            }
            textFieldsView.layer.borderColor = textFieldBorderColor.cgColor
            textFieldsView.layer.borderWidth = thin
            textAreaView.addSubview(textFieldsView)
            textFieldsView.frame.size.height = textFieldsViewHeight
            textAreaPositionY += textFieldsView.frame.size.height
        }
        if hasTitle || hasMessage || hasImageView || hasTextField {
            textAreaPositionY += (margin * 2)
            textAreaBackgroundView.backgroundColor = backgroundColor
        } else {
            textAreaPositionY = 0
        }
        textAreaHeight = textAreaPositionY
        textAreaViewHeightConstraint.constant = textAreaHeight
        textAreaVisualEffectViewHeightConstraint.constant = textAreaHeight
        textAreaBackgroundViewHeightConstraint.constant = textAreaHeight
        var cornerViewHeight = textAreaHeight
        var alertViewHeight: CGFloat = 0
        // button setUp
        switch style {
        case .alert where actions.count == 2 && (hasTitle || hasMessage || hasImageView || hasTextField):
            cornerViewHeight += thin
            actions.enumerated().forEach { index, action in
                let rect = CGRect(x: CGFloat(index) * alertViewWidth / 2,
                                  y: cornerViewHeight,
                                  width: alertViewWidth / 2,
                                  height: buttonHeight)
                action.backgroundView.frame = rect
                action.backgroundView.backgroundColor = buttonBackgroundColor
                action.visualEffectView?.frame = rect
                action.button.frame = rect
                if let visualEffectView = action.visualEffectView {
                    cornerView.addSubview(action.backgroundView)
                    cornerView.addSubview(visualEffectView)
                }
                action.button.setTitleColor(buttonTextColor[action.style], for: .normal)
                action.button.setTitleColor(buttonDisableTextColor[action.style], for: .disabled)
                action.button.titleLabel?.font = buttonFont[action.style]
                if index == actions.count - 1 {
                    action.visualEffectView?.frame.origin.x += thin
                    action.visualEffectView?.frame.size.width -= thin
                    action.button.frame.origin.x += thin
                    action.button.frame.size.width -= thin
                }
                action.button.addTarget(self,
                                        action: #selector(PCLBlurEffectAlertController.buttonWasTouchUpInside(_:)),
                                        for: .touchUpInside)
                cornerView.addSubview(action.button)
            }
            cornerViewHeight += buttonHeight
        case .alert, .alertVertical:
            actions.enumerated().forEach { index, action in
                cornerViewHeight += thin
                let rect = CGRect(x: 0,
                                  y: cornerViewHeight,
                                  width: alertViewWidth,
                                  height: buttonHeight)
                action.backgroundView.frame = rect
                action.backgroundView.backgroundColor = buttonBackgroundColor
                action.visualEffectView?.frame = rect
                action.button.frame = rect
                if let visualEffectView = action.visualEffectView {
                    cornerView.addSubview(action.backgroundView)
                    cornerView.addSubview(visualEffectView)
                }
                action.button.setTitleColor(buttonTextColor[action.style], for: .normal)
                action.button.setTitleColor(buttonDisableTextColor[action.style], for: .disabled)
                action.button.titleLabel?.font = buttonFont[action.style]
                action.button.addTarget(self,
                                        action: #selector(PCLBlurEffectAlertController.buttonWasTouchUpInside(_:)),
                                        for: .touchUpInside)
                cornerView.addSubview(action.button)
                cornerViewHeight += buttonHeight
            }
        default:
            var cancelIndex = -1
            actions.enumerated().forEach { index, action in
                switch action.style {
                case .cancel:
                    cancelIndex = index
                default:
                    cornerViewHeight += thin
                    let rect = CGRect(x: 0,
                                      y: cornerViewHeight,
                                      width: alertViewWidth,
                                      height: buttonHeight)
                    action.backgroundView.frame = rect
                    action.backgroundView.backgroundColor = buttonBackgroundColor
                    action.visualEffectView?.frame = rect
                    action.button.frame = rect
                    if let visualEffectView = action.visualEffectView {
                        cornerView.addSubview(action.backgroundView)
                        cornerView.addSubview(visualEffectView)
                    }
                    action.button.setTitleColor(buttonTextColor[action.style], for: .normal)
                    action.button.setTitleColor(buttonDisableTextColor[action.style], for: .disabled)
                    action.button.titleLabel?.font = buttonFont[action.style]
                    action.button.addTarget(self,
                                            action: #selector(PCLBlurEffectAlertController.buttonWasTouchUpInside(_:)),
                                            for: .touchUpInside)
                    cornerView.addSubview(action.button)
                    cornerViewHeight += buttonHeight
                }
            }
            alertViewHeight = cornerViewHeight
            if cancelIndex >= 0 { // cancel
                alertViewHeight += margin
                let action = actions[cancelIndex]
                let rect = CGRect(x: 0,
                                  y: alertViewHeight,
                                  width: alertViewWidth,
                                  height: buttonHeight)
                action.backgroundView.frame = rect
                action.backgroundView.backgroundColor = buttonBackgroundColor
                action.visualEffectView?.frame = rect
                action.button.frame = rect
                if let visualEffectView = action.visualEffectView {
                    alertView.addSubview(action.backgroundView)
                    alertView.addSubview(visualEffectView)
                }
                action.button.setTitleColor(buttonTextColor[action.style], for: .normal)
                action.button.setTitleColor(buttonDisableTextColor[action.style], for: .disabled)
                action.button.titleLabel?.font = buttonFont[action.style]
                action.button.addTarget(self,
                                        action: #selector(PCLBlurEffectAlertController.buttonWasTouchUpInside(_:)),
                                        for: .touchUpInside)
                action.backgroundView.clipsToBounds = true
                action.backgroundView.layer.cornerRadius = cornerRadius
                action.visualEffectView?.clipsToBounds = true
                action.visualEffectView?.layer.cornerRadius = cornerRadius
                action.button.clipsToBounds = true
                action.button.layer.cornerRadius = cornerRadius
                alertView.addSubview(action.button)
                alertViewHeight += buttonHeight
            }
        }
        switch style {
        case .actionSheet:
            cornerViewHeightConstraint.constant = cornerViewHeight
        default:
            alertViewHeight = cornerViewHeight
        }
        alertViewHeightConstraint.constant = alertViewHeight
        view.layoutIfNeeded()
    }
    dynamic func buttonWasTouchUpInside(_ sender: UIButton) {
        sender.isSelected = true
        let action = actions[sender.tag]
        dismiss(animated: true) {
            action.handler?(action)
        }
    }
}

// MARK: - PCLRespondsViewDelegate
extension PCLBlurEffectAlertController: PCLRespondsViewDelegate {
    func respondsViewDidTouch(_ view: UIView) {
        guard isActionSheet else { return }
        guard let cancelAction = cancelAction else { return }
        dismiss(animated: true) {
            cancelAction.handler?(cancelAction)
        }
    }
}

// MARK: - PCLAlertKeyboardNotificationObserver, PCLAlertActionEnabledDidChangeNotificationObserver
extension PCLBlurEffectAlertController : PCLAlertKeyboardNotificationObserver, PCLAlertActionEnabledDidChangeNotificationObserver {
    func keyboardWillHide(_ notification: Notification) {
        keyboardHeight = 0
        containerViewBottomLayoutConstraint.constant = keyboardHeight
        UIView.animate(withDuration: 0.3) {
            self.view.layoutIfNeeded()
        }
    }
    func keyboardWillShow(_ notification: Notification) {
        guard let userInfo = notification.userInfo as? [String: AnyObject],
            let keyboardSize = userInfo[UIKeyboardFrameEndUserInfoKey]?.cgRectValue.size else {
                return
        }
        keyboardHeight = keyboardSize.height
        containerViewBottomLayoutConstraint.constant = -keyboardHeight
        UIView.animate(withDuration: 0.3) {
            self.view.layoutIfNeeded()
        }
    }
    func alertActionEnabledDidChange(_ notification: Notification) {
        actions.forEach { $0.button.isEnabled = $0.isEnabled }
    }
}

// MARK: - UIViewControllerTransitioningDelegate
extension PCLBlurEffectAlertController: UIViewControllerTransitioningDelegate {
    public func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
        return PCLBlurEffectAlertTransitionAnimator(present: true)
    }
    public func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
        return PCLBlurEffectAlertTransitionAnimator(present: false)
    }
}

// MARK: - UIApplication
private extension UIApplication {
    var topViewController: UIViewController? {
        guard var topViewController = UIApplication.shared.keyWindow?.rootViewController else { return nil }
        while let presentedViewController = topViewController.presentedViewController {
            topViewController = presentedViewController
        }
        return topViewController
    }
}


================================================
FILE: Sources/PCLBlurEffectAlert+TransitionAnimator.swift
================================================
//
//  PCLBlurEffectAlertController+Tr.swift
//  PCLBlurEffectAlert
//
//  Created by hiroyuki yoshida on 2017/02/26.
//
//

import UIKit

public typealias PCLBlurEffectAlertTransitionAnimator = PCLBlurEffectAlert.TransitionAnimator

extension PCLBlurEffectAlert {
    // MARK: - TransitionAnimator
    open class TransitionAnimator: NSObject, UIViewControllerAnimatedTransitioning {
        fileprivate typealias TransitionAnimator = PCLBlurEffectAlert.TransitionAnimator
        fileprivate static let presentBackAnimationDuration: TimeInterval = 0.45
        fileprivate static let dismissBackAnimationDuration: TimeInterval = 0.35
        fileprivate var goingPresent: Bool!
        init(present: Bool) {
            super.init()
            goingPresent = present
        }
        open func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval {
            if goingPresent == true {
                return TransitionAnimator.presentBackAnimationDuration
            } else {
                return TransitionAnimator.dismissBackAnimationDuration
            }
        }
        open func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
            if goingPresent == true {
                presentAnimation(transitionContext)
            } else {
                dismissAnimation(transitionContext)
            }
        }
    }
}

// MARK: - Extension
private extension PCLBlurEffectAlert.TransitionAnimator {
    func presentAnimation(_ transitionContext: UIViewControllerContextTransitioning) {
        guard let alertController = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.to) as? PCLBlurEffectAlertController else {
            transitionContext.completeTransition(false)
            return
        }
        let containerView = transitionContext.containerView
        containerView.backgroundColor = .clear
        containerView.addSubview(alertController.view)
        alertController.overlayView.alpha = 0
        let animations: (() -> Void)
        switch alertController.style {
        case .actionSheet:
            alertController.alertView.transform = CGAffineTransform(translationX: 0,
                                                                    y: alertController.alertView.frame.height)
            animations = {
                alertController.overlayView.alpha = 1
                alertController.alertView.transform = CGAffineTransform(translationX: 0, y: -10)
            }
        default:
            alertController.cornerView.subviews.forEach { $0.alpha = 0 }
            alertController.alertView.center = alertController.view.center
            alertController.alertView.transform = CGAffineTransform(scaleX: 0.5, y: 0.5)
            animations = {
                alertController.overlayView.alpha = 1
                alertController.cornerView.subviews.forEach { $0.alpha = 1 }
                alertController.alertView.transform = CGAffineTransform(scaleX: 1.05, y: 1.05)
            }
        }
        UIView.animate(withDuration: transitionDuration(using: transitionContext) * (5 / 9), animations: animations) { finished in
            guard finished else { return }
            let animations = {
                alertController.alertView.transform = CGAffineTransform.identity
            }
            UIView.animate(withDuration: self.transitionDuration(using: transitionContext) * (4 / 9), animations: animations) { finished in
                guard finished else { return }
                let cancelled = transitionContext.transitionWasCancelled
                if cancelled {
                    alertController.view.removeFromSuperview()
                }
                transitionContext.completeTransition(!cancelled)
            }
        }
    }
    func dismissAnimation(_ transitionContext: UIViewControllerContextTransitioning) {
        guard let alertController = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.from) as? PCLBlurEffectAlertController else {
            transitionContext.completeTransition(false)
            return
        }
        let animations = {
            alertController.overlayView.alpha = 0
            switch alertController.style {
            case .actionSheet:
                alertController.containerView.transform = CGAffineTransform(translationX: 0,
                                                                            y: alertController.alertView.frame.height)
            default:
                alertController.alertView.transform = CGAffineTransform(scaleX: 0.8, y: 0.8)
                alertController.cornerView.subviews.forEach { $0.alpha = 0 }
            }
        }
        UIView.animate(withDuration: transitionDuration(using: transitionContext), delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 0, options: UIViewAnimationOptions(), animations: animations) { finished in
            guard finished else { return }
            transitionContext.completeTransition(!transitionContext.transitionWasCancelled)
        }
    }
}


================================================
FILE: Sources/PCLBlurEffectAlert.h
================================================
//
//  PCLBlurEffectAlert.h
//  PCLBlurEffectAlert
//
//  Created by hiroyuki yoshida on 2016/05/11.
//  Copyright © 2016年 hiroyuki yoshida. All rights reserved.
//

#import <UIKit/UIKit.h>

//! Project version number for PCLBlurEffectAlert.
FOUNDATION_EXPORT double PCLBlurEffectAlertVersionNumber;

//! Project version string for PCLBlurEffectAlert.
FOUNDATION_EXPORT const unsigned char PCLBlurEffectAlertVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <PCLBlurEffectAlert/PublicHeader.h>




================================================
FILE: Sources/PCLBlurEffectAlert.swift
================================================
//
//  PCLBlurEffectAlert.swift
//  Pods
//
//  Created by hryk224 on 2015/10/14.
//
//

import UIKit

open class PCLBlurEffectAlert {
    public enum ActionStyle {
        case `default`, cancel, destructive
        var isCancel: Bool {
            return self == .cancel
        }
    }
    public enum ControllerStyle {
        case actionSheet, alert, alertVertical
    }
}

// MARK: - RespondsView
extension PCLBlurEffectAlert {
    final class RespondsView: UIView {
        weak var delegate: PCLRespondsViewDelegate?
        required init?(coder aDecoder: NSCoder) {
            super.init(coder: aDecoder)
        }
        override init(frame: CGRect) {
            super.init(frame: frame)
        }
        override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
            super.touchesEnded(touches, with: event)
            delegate?.respondsViewDidTouch(self)
        }
    }
}

// MARK: - PCLRespondsViewDelegate
protocol PCLRespondsViewDelegate: class {
    func respondsViewDidTouch(_ view: UIView)
}

// MARK: - NotificationManager
extension PCLBlurEffectAlert {
    struct NotificationManager {
        static let shared = PCLBlurEffectAlert.NotificationManager()
        fileprivate let notificationCenter = NotificationCenter.default
    }
}

// MARK: - keyboardWillShow/Hide
@objc protocol PCLAlertKeyboardNotificationObserver: class {
    func keyboardWillShow(_ notification: Notification)
    func keyboardWillHide(_ notification: Notification)
}

extension PCLBlurEffectAlert.NotificationManager {
    func addKeyboardNotificationObserver(_ observer: PCLAlertKeyboardNotificationObserver) {
        notificationCenter.addObserver(observer,
                                       selector: #selector(PCLAlertKeyboardNotificationObserver.keyboardWillShow(_:)),
                                       name: Notification.Name.UIKeyboardWillShow,
                                       object: nil)
        notificationCenter.addObserver(observer,
                                       selector: #selector(PCLAlertKeyboardNotificationObserver.keyboardWillHide(_:)),
                                       name: Notification.Name.UIKeyboardWillHide,
                                       object: nil)
    }
    func removeKeyboardNotificationObserver(_ observer: PCLAlertKeyboardNotificationObserver) {
        notificationCenter.removeObserver(observer,
                                          name: Notification.Name.UIKeyboardWillShow,
                                          object: nil)
        notificationCenter.removeObserver(observer,
                                          name: Notification.Name.UIKeyboardWillHide,
                                          object: nil)
    }
    func postKeyboardWillShowNotification() {
        notificationCenter.post(Notification(name: Notification.Name.UIKeyboardWillShow,
                                             object: nil))
    }
    func postKeyboardWillHideNotification() {
        notificationCenter.post(Notification(name: Notification.Name.UIKeyboardWillHide,
                                             object: nil))
    }
}


// MARK: - AlertActionEnabledDidChange
@objc protocol PCLAlertActionEnabledDidChangeNotificationObserver: class {
    func alertActionEnabledDidChange(_ notification: Notification)
}
// MARK: - private
extension PCLBlurEffectAlert.NotificationManager {
    private typealias Manager = PCLBlurEffectAlert.NotificationManager
    private static let AlertActionEnabledDidChangeNotification = "AlertActionEnabledDidChangeNotification"
    func addAlertActionEnabledDidChangeNotificationObserver(_ observer: PCLAlertActionEnabledDidChangeNotificationObserver) {
        notificationCenter.addObserver(observer,
                                       selector: #selector(PCLAlertActionEnabledDidChangeNotificationObserver.alertActionEnabledDidChange(_:)),
                                       name: Notification.Name(rawValue: Manager.AlertActionEnabledDidChangeNotification),
                                       object: nil)
    }
    func removeAlertActionEnabledDidChangeNotificationObserver(_ observer: PCLAlertActionEnabledDidChangeNotificationObserver) {
        notificationCenter.removeObserver(observer,
                                          name: Notification.Name(rawValue: Manager.AlertActionEnabledDidChangeNotification),
                                          object: nil)
    }
    func postAlertActionEnabledDidChangeNotification() {
        notificationCenter.post(Notification(name: Notification.Name(rawValue: Manager.AlertActionEnabledDidChangeNotification),
                                             object: nil,
                                             userInfo: nil))
    }
}
Download .txt
gitextract_2sf9pjr1/

├── .gitignore
├── .swift-version
├── Example/
│   ├── Example/
│   │   ├── AppDelegate.swift
│   │   ├── Assets.swift
│   │   ├── Assets.xcassets/
│   │   │   ├── AppIcon.appiconset/
│   │   │   │   └── Contents.json
│   │   │   ├── Contents.json
│   │   │   ├── sample1.imageset/
│   │   │   │   └── Contents.json
│   │   │   ├── sample2.imageset/
│   │   │   │   └── Contents.json
│   │   │   └── sampleBackground.imageset/
│   │   │       └── Contents.json
│   │   ├── Base.lproj/
│   │   │   ├── LaunchScreen.storyboard
│   │   │   └── MainViewController.storyboard
│   │   ├── Info.plist
│   │   └── MainViewController.swift
│   └── Example.xcodeproj/
│       ├── project.pbxproj
│       └── project.xcworkspace/
│           └── contents.xcworkspacedata
├── LICENSE
├── PCLBlurEffectAlert.podspec
├── PCLBlurEffectAlert.xcodeproj/
│   ├── PCLBlurEffectAlertTests_Info.plist
│   ├── PCLBlurEffectAlert_Info.plist
│   ├── project.pbxproj
│   ├── project.xcworkspace/
│   │   └── contents.xcworkspacedata
│   └── xcshareddata/
│       └── xcschemes/
│           ├── PCLBlurEffectAlert.xcscheme
│           └── xcschememanagement.plist
├── Package.swift
├── README.md
└── Sources/
    ├── PCLBlurEffectAlert+Action.swift
    ├── PCLBlurEffectAlert+Controller.swift
    ├── PCLBlurEffectAlert+TransitionAnimator.swift
    ├── PCLBlurEffectAlert.h
    └── PCLBlurEffectAlert.swift
Condensed preview — 30 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (138K chars).
[
  {
    "path": ".gitignore",
    "chars": 255,
    "preview": "# Mac\n.DS_Store\n\n# Xcode\nbuild/*\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.pers"
  },
  {
    "path": ".swift-version",
    "chars": 4,
    "preview": "3.0\n"
  },
  {
    "path": "Example/Example/AppDelegate.swift",
    "chars": 2182,
    "preview": "//\n//  AppDelegate.swift\n//  Example\n//\n//  Created by yoshida hiroyuki on 2015/10/15.\n//  Copyright © 2015年 yoshida hir"
  },
  {
    "path": "Example/Example/Assets.swift",
    "chars": 469,
    "preview": "//\n//  Assets.swift\n//  Example\n//\n//  Created by yoshida hiroyuki on 2017/02/27.\n//  Copyright © 2017年 hiroyuki yoshida"
  },
  {
    "path": "Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "chars": 1495,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\""
  },
  {
    "path": "Example/Example/Assets.xcassets/Contents.json",
    "chars": 62,
    "preview": "{\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "Example/Example/Assets.xcassets/sample1.imageset/Contents.json",
    "chars": 304,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"recipes.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n"
  },
  {
    "path": "Example/Example/Assets.xcassets/sample2.imageset/Contents.json",
    "chars": 300,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"cat.jpg\",\n      \"scale\" : \"1x\"\n    },\n    {\n    "
  },
  {
    "path": "Example/Example/Assets.xcassets/sampleBackground.imageset/Contents.json",
    "chars": 339,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"PAKU160126410I9A5301-thumb-autox1600-21285.jpg\","
  },
  {
    "path": "Example/Example/Base.lproj/LaunchScreen.storyboard",
    "chars": 1765,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3"
  },
  {
    "path": "Example/Example/Base.lproj/MainViewController.storyboard",
    "chars": 8938,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3"
  },
  {
    "path": "Example/Example/Info.plist",
    "chars": 1219,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "Example/Example/MainViewController.swift",
    "chars": 12172,
    "preview": "//\n//  MainViewController.swift\n//  PCLAlertController\n//\n//  Created by yoshida hiroyuki on 2015/10/12.\n//  Copyright ©"
  },
  {
    "path": "Example/Example.xcodeproj/project.pbxproj",
    "chars": 14825,
    "preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
  },
  {
    "path": "Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "chars": 152,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:Example.xcodepr"
  },
  {
    "path": "LICENSE",
    "chars": 1074,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2015 hryk224\n\nPermission is hereby granted, free of charge, to any person obtaining"
  },
  {
    "path": "PCLBlurEffectAlert.podspec",
    "chars": 665,
    "preview": "Pod::Spec.new do |s|\n  s.name         = \"PCLBlurEffectAlert\"\n  s.version      = \"2.1.1\"\n  s.summary      = \"Custom Swift"
  },
  {
    "path": "PCLBlurEffectAlert.xcodeproj/PCLBlurEffectAlertTests_Info.plist",
    "chars": 723,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<plist version=\"1.0\">\n<dict>\n  <key>CFBundleDevelopmentRegion</key>\n  <string>en<"
  },
  {
    "path": "PCLBlurEffectAlert.xcodeproj/PCLBlurEffectAlert_Info.plist",
    "chars": 808,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "PCLBlurEffectAlert.xcodeproj/project.pbxproj",
    "chars": 9206,
    "preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
  },
  {
    "path": "PCLBlurEffectAlert.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "chars": 135,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:\">\n   </FileRef"
  },
  {
    "path": "PCLBlurEffectAlert.xcodeproj/xcshareddata/xcschemes/PCLBlurEffectAlert.xcscheme",
    "chars": 2962,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"9999\"\n   version = \"1.3\">\n   <BuildAction\n      "
  },
  {
    "path": "PCLBlurEffectAlert.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist",
    "chars": 253,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<plist version=\"1.0\">\n<dict>\n  <key>SchemeUserState</key>\n  <dict>\n    <key>PCLBl"
  },
  {
    "path": "Package.swift",
    "chars": 220,
    "preview": "import PackageDescription\n\nlet package = Package(\n    name: \"PCLBlurEffectAlert\",\n    targets: [],\n    dependencies: [\n "
  },
  {
    "path": "README.md",
    "chars": 9536,
    "preview": "# PCLBlurEffectAlert\n\nSwift AlertController, use UIVisualeffectview\n\n[![Cocoapods Compatible](http://img.shields.io/coco"
  },
  {
    "path": "Sources/PCLBlurEffectAlert+Action.swift",
    "chars": 1667,
    "preview": "//\n//  PCLBlurEffectAlert+Action.swift\n//  PCLBlurEffectAlert\n//\n//  Created by yoshida hiroyuki on 2016/09/15.\n//  Copy"
  },
  {
    "path": "Sources/PCLBlurEffectAlert+Controller.swift",
    "chars": 47494,
    "preview": "//\n//  PCLBlurEffectAlert+Controller.swift\n//  PCLBlurEffectAlert\n//\n//  Created by yoshida hiroyuki on 2016/09/15.\n//  "
  },
  {
    "path": "Sources/PCLBlurEffectAlert+TransitionAnimator.swift",
    "chars": 5108,
    "preview": "//\n//  PCLBlurEffectAlertController+Tr.swift\n//  PCLBlurEffectAlert\n//\n//  Created by hiroyuki yoshida on 2017/02/26.\n//"
  },
  {
    "path": "Sources/PCLBlurEffectAlert.h",
    "chars": 572,
    "preview": "//\n//  PCLBlurEffectAlert.h\n//  PCLBlurEffectAlert\n//\n//  Created by hiroyuki yoshida on 2016/05/11.\n//  Copyright © 201"
  },
  {
    "path": "Sources/PCLBlurEffectAlert.swift",
    "chars": 4756,
    "preview": "//\n//  PCLBlurEffectAlert.swift\n//  Pods\n//\n//  Created by hryk224 on 2015/10/14.\n//\n//\n\nimport UIKit\n\nopen class PCLBlu"
  }
]

About this extraction

This page contains the full source code of the hryk224/PCLBlurEffectAlert GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 30 files (126.6 KB), approximately 29.5k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!