[
  {
    "path": ".gitignore",
    "content": "## Build generated\nbuild/\nDerivedData\nbuild.xcarchive\n\n## Various settings\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\nxcuserdata\n\n## Other\n*.xccheckout\n*.moved-aside\n*.xcuserstate\n*.xcscmblueprint\n\n## Obj-C/Swift specific\n*.hmap\n*.ipa\n\n# CocoaPods\nPods/\n\n# Carthage\nCarthage/Checkouts\nCarthage/Build"
  },
  {
    "path": ".swift-version",
    "content": "5.0\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2017 Tien Le\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "MTSlideToOpen/AppDelegate.swift",
    "content": "//\n//  AppDelegate.swift\n//  MTSlideToOpen\n//\n//  Created by Martin Lee on 10/12/17.\n//  Copyright © 2017 Martin Le. All rights reserved.\n//\n\nimport UIKit\n\n@UIApplicationMain\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n    var window: UIWindow?\n\n\n    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {\n        // Override point for customization after application launch.\n        return true\n    }\n\n    func applicationWillResignActive(_ application: UIApplication) {\n        // 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.\n        // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.\n    }\n\n    func applicationDidEnterBackground(_ application: UIApplication) {\n        // 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.\n        // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.\n    }\n\n    func applicationWillEnterForeground(_ application: UIApplication) {\n        // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.\n    }\n\n    func applicationDidBecomeActive(_ application: UIApplication) {\n        // 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.\n    }\n\n    func applicationWillTerminate(_ application: UIApplication) {\n        // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.\n    }\n\n\n}\n\n"
  },
  {
    "path": "MTSlideToOpen/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"60x60\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"60x60\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"76x76\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"76x76\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"83.5x83.5\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ios-marketing\",\n      \"size\" : \"1024x1024\",\n      \"scale\" : \"1x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "MTSlideToOpen/Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "MTSlideToOpen/Assets.xcassets/ic_arrow.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"ic_arrow.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "MTSlideToOpen/Base.lproj/LaunchScreen.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"13122.16\" systemVersion=\"17A277\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">\n    <dependencies>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"13104.12\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"EHf-IW-A2E\">\n            <objects>\n                <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <viewLayoutGuide key=\"safeArea\" id=\"6Tk-OE-BBY\"/>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"53\" y=\"375\"/>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "MTSlideToOpen/Base.lproj/Main.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"13196\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"BYZ-38-t0r\">\n    <device id=\"retina4_7\" orientation=\"portrait\">\n        <adaptation id=\"fullscreen\"/>\n    </device>\n    <dependencies>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"13173\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"tne-QT-ifu\">\n            <objects>\n                <viewController id=\"BYZ-38-t0r\" customClass=\"ViewController\" customModule=\"MTSlideToOpen\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"8bC-Xf-vdC\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"calibratedRGB\"/>\n                        <viewLayoutGuide key=\"safeArea\" id=\"6Tk-OE-BBY\"/>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"dkx-z0-nzr\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "MTSlideToOpen/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIMainStoryboardFile</key>\n\t<string>Main</string>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>armv7</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations~ipad</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "MTSlideToOpen/ViewController.swift",
    "content": "//\n//  ViewController.swift\n//  MTSlideToOpen\n//\n//  Created by Martin Lee on 10/12/17.\n//  Copyright © 2017 Martin Le. All rights reserved.\n//\n\nimport UIKit\n\nclass ViewController: UIViewController, MTSlideToOpenDelegate {\n    lazy var slideToOpen: MTSlideToOpenView = {\n        let slide = MTSlideToOpenView(frame: CGRect(x: 26, y: 100, width: 317, height: 56))\n        slide.sliderViewTopDistance = 0\n        slide.sliderCornerRadius = 28\n        slide.showSliderText = true\n        slide.thumbnailColor = UIColor(red:141.0/255, green:19.0/255, blue:65.0/255, alpha:1.0)\n        slide.slidingColor = UIColor.red\n        slide.textColor = UIColor.orange\n        slide.sliderBackgroundColor = UIColor(red:0.88, green:1, blue:0.98, alpha:1.0)\n        slide.delegate = self\n        slide.thumnailImageView.image = #imageLiteral(resourceName: \"ic_arrow\").imageFlippedForRightToLeftLayoutDirection()\n\n        return slide\n    }()\n    lazy var slideToLock: MTSlideToOpenView = {\n        let slide = MTSlideToOpenView(frame: CGRect(x: 26, y: 200, width: 317, height: 56))\n        slide.sliderViewTopDistance = 0\n        slide.sliderCornerRadius = 28\n        slide.thumnailImageView.backgroundColor  = UIColor(red:200.0/255, green:200.0/255, blue:200.0/255, alpha:1.0)\n        slide.draggedView.backgroundColor = UIColor(red:200.0/255, green:200.0/255, blue:200.0/255, alpha:1.0)\n        slide.delegate = self\n        slide.thumbnailViewStartingDistance = 20\n        slide.labelText = \"Slide To Lock\"\n        slide.thumnailImageView.image = #imageLiteral(resourceName: \"ic_arrow\").imageFlippedForRightToLeftLayoutDirection()\n        return slide\n    }()\n    lazy var customizeSlideToOpen: MTSlideToOpenView = {\n        let slide = MTSlideToOpenView(frame: CGRect(x: 26, y: 300, width: 317, height: 56))\n        slide.sliderViewTopDistance = 0\n        slide.thumbnailViewTopDistance = 4;\n        slide.thumbnailViewStartingDistance = 4;\n        slide.sliderCornerRadius = 28\n        slide.thumnailImageView.backgroundColor = .white\n        slide.draggedView.backgroundColor = .clear\n        slide.delegate = self\n        slide.thumnailImageView.image = #imageLiteral(resourceName: \"ic_arrow\").imageFlippedForRightToLeftLayoutDirection()\n        slide.sliderBackgroundColor = .black\n        return slide\n    }()\n    lazy var slideToUnlock: MTSlideToOpenView = {\n        let frame = CGRect(x: 26, y: 400, width: 317, height: 56)\n        let slide = MTSlideToOpenView(frame: frame)\n        slide.sliderViewTopDistance = 6\n        slide.sliderCornerRadius = 22\n        slide.delegate = self\n        slide.labelText = \"Slide To Unlock\"\n        slide.thumnailImageView.image = #imageLiteral(resourceName: \"ic_arrow\").imageFlippedForRightToLeftLayoutDirection()\n        slide.animationChangedEnabledBlock = { isEnabled in\n            if isEnabled {\n                slide.thumnailImageView.backgroundColor = slide.thumbnailColor\n                slide.draggedView.isHidden = false\n                slide.thumnailImageView.backgroundColor = slide.sliderBackgroundColor\n                slide.textLabel.text = slide.labelText\n                slide.thumnailImageView.layer.shadowOpacity = 0\n            } else {\n                slide.thumnailImageView.backgroundColor = UIColor(red:210.0/255, green:219.0/255, blue:228.0/255, alpha:0.8)\n                slide.thumnailImageView.layer.shadowColor = UIColor(red:0/255, green:0/255, blue:0/255, alpha:0.2).cgColor\n                slide.thumnailImageView.layer.shadowOffset = CGSize(width: 0, height: 25)\n                slide.thumnailImageView.layer.shadowRadius = 28\n                slide.thumnailImageView.layer.shadowOpacity = 1\n                slide.draggedView.isHidden = true\n                slide.sliderHolderView.backgroundColor = UIColor(red:245.0/255, green:247.0/255, blue:250.0/255, alpha:1)\n                slide.textLabel.text = \"\"\n            }\n        }\n        slide.isEnabled = false\n        return slide\n    }()\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        self.view.addSubview(slideToOpen)\n        self.view.addSubview(slideToUnlock)\n        self.view.addSubview(customizeSlideToOpen)\n        self.view.addSubview(slideToLock)\n    }\n    \n    // MARK: MTSlideToOpenDelegate\n    func mtSlideToOpenDelegateDidFinish(_ sender: MTSlideToOpenView) {\n        let alertController = UIAlertController(title: \"\", message: \"Done!\", preferredStyle: .alert)\n        let doneAction = UIAlertAction(title: \"Okay\", style: .default) { (action) in\n            sender.resetStateWithAnimation(false)\n        }\n        alertController.addAction(doneAction)\n        self.present(alertController, animated: true, completion: nil)\n        \n    }\n}\n\n"
  },
  {
    "path": "MTSlideToOpen.podspec",
    "content": "Pod::Spec.new do |s|\n\n  # ―――  Spec Metadata  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #\n  #\n\n  s.name         = \"MTSlideToOpen\"\n  s.version      = \"1.5.1\"\n  s.summary      = \"A simple SlideToUnlock iOS UI component.\"\n\n  s.description  = \"A simple iOS UI component acts Slide To Unlock.\"\n\n  s.homepage     = \"https://github.com/lemanhtien/MTSlideToOpen\"\n  s.screenshots  = \"https://raw.githubusercontent.com/lemanhtien/MTSlideToOpen/master/Screenshot.png\"\n\n\n  # ―――  Spec License  ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #\n  #\n\n  s.license      = { :type => \"MIT\", :file => \"LICENSE\" }\n\n\n  # ――― Author Metadata  ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #\n  #\n\n  s.author             = { \"Tien Le\" => \"lemanhtien.bka@gmail.com\" }\n  s.social_media_url   = \"https://twitter.com/Martin_ManhTien\"\n\n  # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #\n  #\n  #  If this Pod runs only on iOS or OS X, then specify the platform and\n  #  the deployment target. You can optionally include the target after the platform.\n  #\n\n  s.platform     = :ios, \"9.0\"\n\n\n  # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #\n  #\n\n  s.source       = { :git => \"https://github.com/lemanhtien/MTSlideToOpen.git\", :tag => s.version }\n\n\n  # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #\n  #\n\n  s.source_files  = \"Source\"\n  s.framework  = \"UIKit\"\n  s.pod_target_xcconfig = { \"SWIFT_VERSION\" => \"5.0\" }\n  s.swift_version = '5.0'\n  s.requires_arc = true\n\n\nend\n"
  },
  {
    "path": "MTSlideToOpen.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 48;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\tBD0B6A0F1F8F4E1200D3AC94 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD0B6A0E1F8F4E1200D3AC94 /* AppDelegate.swift */; };\n\t\tBD0B6A111F8F4E1200D3AC94 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD0B6A101F8F4E1200D3AC94 /* ViewController.swift */; };\n\t\tBD0B6A141F8F4E1200D3AC94 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BD0B6A121F8F4E1200D3AC94 /* Main.storyboard */; };\n\t\tBD0B6A161F8F4E1200D3AC94 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BD0B6A151F8F4E1200D3AC94 /* Assets.xcassets */; };\n\t\tBD0B6A191F8F4E1200D3AC94 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BD0B6A171F8F4E1200D3AC94 /* LaunchScreen.storyboard */; };\n\t\tBD392E561F8F5835005F0194 /* MTSlideToOpenView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD392E551F8F5835005F0194 /* MTSlideToOpenView.swift */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\tBD0B6A0B1F8F4E1200D3AC94 /* MTSlideToOpen.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MTSlideToOpen.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\tBD0B6A0E1F8F4E1200D3AC94 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\tBD0B6A101F8F4E1200D3AC94 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = \"<group>\"; };\n\t\tBD0B6A131F8F4E1200D3AC94 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = \"<group>\"; };\n\t\tBD0B6A151F8F4E1200D3AC94 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = \"<group>\"; };\n\t\tBD0B6A181F8F4E1200D3AC94 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = \"<group>\"; };\n\t\tBD0B6A1A1F8F4E1200D3AC94 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\tBD392E551F8F5835005F0194 /* MTSlideToOpenView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MTSlideToOpenView.swift; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\tBD0B6A081F8F4E1200D3AC94 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\tBD0B6A021F8F4E1200D3AC94 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tBD0B6A0D1F8F4E1200D3AC94 /* MTSlideToOpen */,\n\t\t\t\tBD0B6A0C1F8F4E1200D3AC94 /* Products */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tBD0B6A0C1F8F4E1200D3AC94 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tBD0B6A0B1F8F4E1200D3AC94 /* MTSlideToOpen.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tBD0B6A0D1F8F4E1200D3AC94 /* MTSlideToOpen */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tBD392E541F8F5790005F0194 /* Source */,\n\t\t\t\tBD0B6A0E1F8F4E1200D3AC94 /* AppDelegate.swift */,\n\t\t\t\tBD0B6A101F8F4E1200D3AC94 /* ViewController.swift */,\n\t\t\t\tBD0B6A121F8F4E1200D3AC94 /* Main.storyboard */,\n\t\t\t\tBD0B6A151F8F4E1200D3AC94 /* Assets.xcassets */,\n\t\t\t\tBD0B6A171F8F4E1200D3AC94 /* LaunchScreen.storyboard */,\n\t\t\t\tBD0B6A1A1F8F4E1200D3AC94 /* Info.plist */,\n\t\t\t);\n\t\t\tpath = MTSlideToOpen;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tBD392E541F8F5790005F0194 /* Source */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tBD392E551F8F5835005F0194 /* MTSlideToOpenView.swift */,\n\t\t\t);\n\t\t\tpath = Source;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\tBD0B6A0A1F8F4E1200D3AC94 /* MTSlideToOpen */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = BD0B6A1D1F8F4E1200D3AC94 /* Build configuration list for PBXNativeTarget \"MTSlideToOpen\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tBD0B6A071F8F4E1200D3AC94 /* Sources */,\n\t\t\t\tBD0B6A081F8F4E1200D3AC94 /* Frameworks */,\n\t\t\t\tBD0B6A091F8F4E1200D3AC94 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = MTSlideToOpen;\n\t\t\tproductName = MTSlideToOpen;\n\t\t\tproductReference = BD0B6A0B1F8F4E1200D3AC94 /* MTSlideToOpen.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\tBD0B6A031F8F4E1200D3AC94 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastSwiftUpdateCheck = 0900;\n\t\t\t\tLastUpgradeCheck = 1000;\n\t\t\t\tORGANIZATIONNAME = \"Martin Le\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\tBD0B6A0A1F8F4E1200D3AC94 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 9.0;\n\t\t\t\t\t\tLastSwiftMigration = 1000;\n\t\t\t\t\t\tProvisioningStyle = Automatic;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = BD0B6A061F8F4E1200D3AC94 /* Build configuration list for PBXProject \"MTSlideToOpen\" */;\n\t\t\tcompatibilityVersion = \"Xcode 8.0\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = BD0B6A021F8F4E1200D3AC94;\n\t\t\tproductRefGroup = BD0B6A0C1F8F4E1200D3AC94 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\tBD0B6A0A1F8F4E1200D3AC94 /* MTSlideToOpen */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\tBD0B6A091F8F4E1200D3AC94 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tBD0B6A191F8F4E1200D3AC94 /* LaunchScreen.storyboard in Resources */,\n\t\t\t\tBD0B6A161F8F4E1200D3AC94 /* Assets.xcassets in Resources */,\n\t\t\t\tBD0B6A141F8F4E1200D3AC94 /* Main.storyboard in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\tBD0B6A071F8F4E1200D3AC94 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tBD0B6A111F8F4E1200D3AC94 /* ViewController.swift in Sources */,\n\t\t\t\tBD392E561F8F5835005F0194 /* MTSlideToOpenView.swift in Sources */,\n\t\t\t\tBD0B6A0F1F8F4E1200D3AC94 /* AppDelegate.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXVariantGroup section */\n\t\tBD0B6A121F8F4E1200D3AC94 /* Main.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\tBD0B6A131F8F4E1200D3AC94 /* Base */,\n\t\t\t);\n\t\t\tname = Main.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tBD0B6A171F8F4E1200D3AC94 /* LaunchScreen.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\tBD0B6A181F8F4E1200D3AC94 /* Base */,\n\t\t\t);\n\t\t\tname = LaunchScreen.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\tBD0B6A1B1F8F4E1200D3AC94 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tSWIFT_VERSION = 4.0;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tBD0B6A1C1F8F4E1200D3AC94 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Owholemodule\";\n\t\t\t\tSWIFT_VERSION = 4.0;\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\tBD0B6A1E1F8F4E1200D3AC94 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_TEAM = 4Y74WWZQUR;\n\t\t\t\tINFOPLIST_FILE = MTSlideToOpen/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"Martin-Le.MTSlideToOpen\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tBD0B6A1F1F8F4E1200D3AC94 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_TEAM = 4Y74WWZQUR;\n\t\t\t\tINFOPLIST_FILE = MTSlideToOpen/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"Martin-Le.MTSlideToOpen\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\tBD0B6A061F8F4E1200D3AC94 /* Build configuration list for PBXProject \"MTSlideToOpen\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tBD0B6A1B1F8F4E1200D3AC94 /* Debug */,\n\t\t\t\tBD0B6A1C1F8F4E1200D3AC94 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\tBD0B6A1D1F8F4E1200D3AC94 /* Build configuration list for PBXNativeTarget \"MTSlideToOpen\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tBD0B6A1E1F8F4E1200D3AC94 /* Debug */,\n\t\t\t\tBD0B6A1F1F8F4E1200D3AC94 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = BD0B6A031F8F4E1200D3AC94 /* Project object */;\n}\n"
  },
  {
    "path": "MTSlideToOpen.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:MTSlideToOpen.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "README.md",
    "content": "# MTSlideToOpen\nA simple SlideToUnlock iOS UI component\n\nA simple SlideToUnlock iOS UI component. Support both **Left-To-Right** and **Right-To-Left** languages.\n\n<p float=\"left\">\n  <a href=\"url\"><img src=\"https://raw.githubusercontent.com/lemanhtien/MTSlideToOpen/master/Screenshot.png\" align=\"center\" height=\"500\" ></a>\n  <a href=\"url\"><img src=\"https://raw.githubusercontent.com/lemanhtien/MTSlideToOpen/master/Right-To-Left.png\" align=\"center\" height=\"500\" ></a>\n</p>\n\n## Requirements\n* Swift 5.0\n* iOS 9.0 or later\n\n## Installation\n\n#### Using CocoaPod\nJust add to your Pod file\n> pod 'MTSlideToOpen'\n\n#### Manual install\n\nDrag and drop folder `Source` to your project. Drag and drop to folder.\n\n\n\n## Usage\n```\n  let slide = MTSlideToOpenView(frame: CGRect(x: 26, y: 400, width: 317, height: 56))\n  slide.sliderViewTopDistance = 6\n  slide.sliderCornerRadious = 22\n  slide.delegate = self\n  slide.defaultLabelText = \"Slide To Unlock\"\n  slide.thumnailImageView.image = ic_arrow\n```\n\n## SwiftUI version\n\nI built another version using SwiftUI. You can check it here [MTSlideToOpen-SwiftUI](https://github.com/lemanhtien/MTSlideToOpen-SwiftUI).\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n"
  },
  {
    "path": "Source/MTSlideToOpenView.swift",
    "content": "//\n//  MTSlideToOpenControl.swift\n//  MTSlideToOpen\n//\n//  Created by Martin Lee on 10/12/17.\n//  Copyright © 2017 Martin Le. All rights reserved.\n//\n\nimport UIKit\n\n@objc public protocol MTSlideToOpenDelegate {\n    func mtSlideToOpenDelegateDidFinish(_ sender: MTSlideToOpenView)\n}\n\n@objcMembers public class MTSlideToOpenView: UIView {\n    // MARK: All Views\n    public let textLabel: UILabel = {\n        let label = UILabel.init()\n        return label\n    }()\n    public let sliderTextLabel: UILabel = {\n        let label = UILabel()\n        return label\n    }()\n    public let thumnailImageView: UIImageView = {\n        let view = MTRoundImageView()\n        view.isUserInteractionEnabled = true        \n        view.contentMode = .center\n        return view\n    }()\n    public let sliderHolderView: UIView = {\n        let view = UIView()\n        return view\n    }()\n    public let draggedView: UIView = {\n        let view = UIView()\n        return view\n    }()\n    public let view: UIView = {\n        let view = UIView()\n        return view\n    }()\n    // MARK: Public properties\n    public weak var delegate: MTSlideToOpenDelegate?\n    public var animationVelocity: Double = 0.2\n    public var sliderViewTopDistance: CGFloat = 8.0 {\n        didSet {\n            topSliderConstraint?.constant = sliderViewTopDistance\n            layoutIfNeeded()\n        }\n    }\n    public var thumbnailViewTopDistance: CGFloat = 0.0 {\n        didSet {\n            topThumbnailViewConstraint?.constant = thumbnailViewTopDistance\n            layoutIfNeeded()\n        }\n    }\n    public var thumbnailViewStartingDistance: CGFloat = 0.0 {\n        didSet {\n            leadingThumbnailViewConstraint?.constant = thumbnailViewStartingDistance\n            trailingDraggedViewConstraint?.constant = thumbnailViewStartingDistance\n            setNeedsLayout()\n        }\n    }\n    public var textLabelLeadingDistance: CGFloat = 0 {\n        didSet {\n            leadingTextLabelConstraint?.constant = textLabelLeadingDistance\n            setNeedsLayout()\n        }\n    }\n    public var isEnabled:Bool = true {\n        didSet {\n            animationChangedEnabledBlock?(isEnabled)\n        }\n    }\n    public var showSliderText:Bool = false {\n        didSet {\n            sliderTextLabel.isHidden = !showSliderText\n        }\n    }\n    public var animationChangedEnabledBlock:((Bool) -> Void)?\n    // MARK: Default styles\n    public var sliderCornerRadius: CGFloat = 30.0 {\n        didSet {\n            sliderHolderView.layer.cornerRadius = sliderCornerRadius\n            draggedView.layer.cornerRadius = sliderCornerRadius\n        }\n    }\n    public var sliderBackgroundColor: UIColor = UIColor(red:0.1, green:0.61, blue:0.84, alpha:0.1) {\n        didSet {\n            sliderHolderView.backgroundColor = sliderBackgroundColor\n            sliderTextLabel.textColor = sliderBackgroundColor\n        }\n    }\n    \n    public var textColor:UIColor = UIColor(red:25.0/255, green:155.0/255, blue:215.0/255, alpha:0.7) {\n        didSet {\n            textLabel.textColor = textColor\n        }\n    }\n    \n    public var slidingColor:UIColor = UIColor(red:25.0/255, green:155.0/255, blue:215.0/255, alpha:0.7) {\n        didSet {\n            draggedView.backgroundColor = slidingColor\n        }\n    }\n    public var thumbnailColor:UIColor = UIColor(red:25.0/255, green:155.0/255, blue:215.0/255, alpha:1) {\n        didSet {\n            thumnailImageView.backgroundColor = thumbnailColor\n        }\n    }\n    public var labelText: String = \"Swipe to open\" {\n        didSet {\n            textLabel.text = labelText\n            sliderTextLabel.text = labelText\n        }\n    }\n    public var textFont: UIFont = UIFont.systemFont(ofSize: 15.0) {\n        didSet {\n            textLabel.font = textFont\n            sliderTextLabel.font = textFont\n        }\n    }\n    // MARK: Private Properties\n    private var leadingThumbnailViewConstraint: NSLayoutConstraint?\n    private var leadingTextLabelConstraint: NSLayoutConstraint?\n    private var topSliderConstraint: NSLayoutConstraint?\n    private var topThumbnailViewConstraint: NSLayoutConstraint?\n    private var trailingDraggedViewConstraint: NSLayoutConstraint?\n    private var xPositionInThumbnailView: CGFloat = 0\n    private var xEndingPoint: CGFloat {\n        get {\n            return (self.view.frame.maxX - thumnailImageView.bounds.width - thumbnailViewStartingDistance)\n        }\n    }\n    private var isFinished: Bool = false\n    \n    override public init(frame: CGRect) {\n        super.init(frame: frame)\n        setupView()\n    }\n    private var panGestureRecognizer: UIPanGestureRecognizer!\n    \n    required public init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)!\n        setupView()        \n    }\n    \n    private func setupView() {\n        self.addSubview(view)\n        view.addSubview(thumnailImageView)\n        view.addSubview(sliderHolderView)\n        view.addSubview(draggedView)\n        draggedView.addSubview(sliderTextLabel)\n        sliderHolderView.addSubview(textLabel)\n        view.bringSubviewToFront(self.thumnailImageView)\n        setupConstraint()\n        setStyle()\n        // Add pan gesture\n        panGestureRecognizer = UIPanGestureRecognizer(target: self, action: #selector(self.handlePanGesture(_:)))\n        panGestureRecognizer.minimumNumberOfTouches = 1\n        thumnailImageView.addGestureRecognizer(panGestureRecognizer)\n    }\n    \n    private func setupConstraint() {\n        view.translatesAutoresizingMaskIntoConstraints = false\n        thumnailImageView.translatesAutoresizingMaskIntoConstraints = false\n        sliderHolderView.translatesAutoresizingMaskIntoConstraints = false\n        textLabel.translatesAutoresizingMaskIntoConstraints = false\n        sliderTextLabel.translatesAutoresizingMaskIntoConstraints = false\n        draggedView.translatesAutoresizingMaskIntoConstraints = false\n        // Setup for view\n        view.leadingAnchor.constraint(equalTo: self.leadingAnchor).isActive = true\n        view.trailingAnchor.constraint(equalTo: self.trailingAnchor).isActive = true\n        view.topAnchor.constraint(equalTo: self.topAnchor).isActive = true\n        view.bottomAnchor.constraint(equalTo: self.bottomAnchor).isActive = true\n        // Setup for circle View\n        leadingThumbnailViewConstraint = thumnailImageView.leadingAnchor.constraint(equalTo: view.leadingAnchor)\n        leadingThumbnailViewConstraint?.isActive = true\n        topThumbnailViewConstraint = thumnailImageView.topAnchor.constraint(equalTo: view.topAnchor, constant: thumbnailViewTopDistance)\n        topThumbnailViewConstraint?.isActive = true\n        thumnailImageView.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true\n        thumnailImageView.heightAnchor.constraint(equalTo: thumnailImageView.widthAnchor).isActive = true\n        // Setup for slider holder view\n        topSliderConstraint = sliderHolderView.topAnchor.constraint(equalTo: view.topAnchor, constant: sliderViewTopDistance)\n        topSliderConstraint?.isActive = true\n        sliderHolderView.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true\n        sliderHolderView.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true\n        sliderHolderView.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true\n        // Setup for textLabel\n        textLabel.topAnchor.constraint(equalTo: sliderHolderView.topAnchor).isActive = true\n        textLabel.centerYAnchor.constraint(equalTo: sliderHolderView.centerYAnchor).isActive = true\n        leadingTextLabelConstraint = textLabel.leadingAnchor.constraint(equalTo: sliderHolderView.leadingAnchor, constant: textLabelLeadingDistance)\n        leadingTextLabelConstraint?.isActive = true\n        textLabel.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: CGFloat(-8)).isActive = true\n        // Setup for sliderTextLabel\n        sliderTextLabel.topAnchor.constraint(equalTo: textLabel.topAnchor).isActive = true\n        sliderTextLabel.centerYAnchor.constraint(equalTo: textLabel.centerYAnchor).isActive = true\n        sliderTextLabel.leadingAnchor.constraint(equalTo: textLabel.leadingAnchor).isActive = true\n        sliderTextLabel.trailingAnchor.constraint(equalTo: textLabel.trailingAnchor).isActive = true\n        // Setup for Dragged View\n        draggedView.leadingAnchor.constraint(equalTo: sliderHolderView.leadingAnchor).isActive = true\n        draggedView.topAnchor.constraint(equalTo: sliderHolderView.topAnchor).isActive = true\n        draggedView.centerYAnchor.constraint(equalTo: sliderHolderView.centerYAnchor).isActive = true\n        trailingDraggedViewConstraint = draggedView.trailingAnchor.constraint(equalTo: thumnailImageView.trailingAnchor, constant: thumbnailViewStartingDistance)\n        trailingDraggedViewConstraint?.isActive = true\n    }\n    \n    private func setStyle() {\n        thumnailImageView.backgroundColor = thumbnailColor\n        textLabel.text = labelText\n        textLabel.font = textFont\n        textLabel.textColor = textColor\n        textLabel.textAlignment = .center\n\n        sliderTextLabel.text = labelText\n        sliderTextLabel.font = textFont\n        sliderTextLabel.textColor = sliderBackgroundColor\n        sliderTextLabel.textAlignment = .center\n        sliderTextLabel.isHidden = !showSliderText\n        \n        if isOnRightToLeftLanguage() {\n            textLabel.mt_flipView()\n            sliderTextLabel.mt_flipView()\n        }\n\n        sliderHolderView.backgroundColor = sliderBackgroundColor\n        sliderHolderView.layer.cornerRadius = sliderCornerRadius\n        draggedView.backgroundColor = slidingColor\n        draggedView.layer.cornerRadius = sliderCornerRadius\n        draggedView.clipsToBounds = true\n        draggedView.layer.masksToBounds = true\n    }\n    \n    private func isTapOnThumbnailViewWithPoint(_ point: CGPoint) -> Bool{\n        return self.thumnailImageView.frame.contains(point)\n    }\n    \n    private func updateThumbnailXPosition(_ x: CGFloat) {\n        leadingThumbnailViewConstraint?.constant = x\n        setNeedsLayout()\n    }\n    \n    // MARK: UIPanGestureRecognizer\n    @objc private func handlePanGesture(_ sender: UIPanGestureRecognizer) {\n        if isFinished || !isEnabled {\n            return\n        }\n        let translatedPoint = sender.translation(in: view).x * (self.isOnRightToLeftLanguage() ? -1 : 1)\n        switch sender.state {\n        case .began:\n            break\n        case .changed:\n            if translatedPoint >= xEndingPoint {\n                updateThumbnailXPosition(xEndingPoint)\n                return\n            }\n            if translatedPoint <= thumbnailViewStartingDistance {\n                textLabel.alpha = 1\n                updateThumbnailXPosition(thumbnailViewStartingDistance)\n                return\n            }\n            updateThumbnailXPosition(translatedPoint)\n            textLabel.alpha = (xEndingPoint - translatedPoint) / xEndingPoint\n            break\n        case .ended:\n            if translatedPoint >= xEndingPoint {\n                textLabel.alpha = 0\n                updateThumbnailXPosition(xEndingPoint)\n                // Finish action\n                isFinished = true\n                delegate?.mtSlideToOpenDelegateDidFinish(self)\n                return\n            }\n            if translatedPoint <= thumbnailViewStartingDistance {\n                textLabel.alpha = 1\n                updateThumbnailXPosition(thumbnailViewStartingDistance)\n                return\n            }\n            UIView.animate(withDuration: animationVelocity) {\n                self.leadingThumbnailViewConstraint?.constant = self.thumbnailViewStartingDistance\n                self.textLabel.alpha = 1\n                self.layoutIfNeeded()\n            }\n            break\n        default:\n            break\n        }\n    }\n    // Others\n    public func resetStateWithAnimation(_ animated: Bool) {\n        let action = {\n            self.leadingThumbnailViewConstraint?.constant = self.thumbnailViewStartingDistance\n            self.textLabel.alpha = 1\n            self.layoutIfNeeded()\n            //\n            self.isFinished = false\n        }\n        if animated {\n            UIView.animate(withDuration: animationVelocity) {\n               action()\n            }\n        } else {\n            action()\n        }\n    }\n    \n    // MARK: Helpers\n    \n    func isOnRightToLeftLanguage() -> Bool {\n        return UIApplication.shared.userInterfaceLayoutDirection == .rightToLeft\n    }\n}\n\nextension UIView {\n   func mt_flipView() {\n       self.transform = CGAffineTransform(scaleX: -1.0, y: 1.0)\n   }\n}\n\nclass MTRoundImageView: UIImageView {\n    override func layoutSubviews() {\n        super.layoutSubviews()\n        let radius: CGFloat = self.bounds.size.width / 2.0\n        self.layer.cornerRadius = radius\n    }\n}\n"
  }
]