Repository: jakelawson1/FlickToDismiss
Branch: master
Commit: cc23f35ef019
Files: 13
Total size: 47.3 KB
Directory structure:
gitextract_zm9hqyrn/
├── .gitignore
├── Example/
│ ├── AppDelegate.swift
│ ├── Assets.xcassets/
│ │ └── AppIcon.appiconset/
│ │ └── Contents.json
│ ├── Base.lproj/
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ └── MainViewController.swift
├── Example.xcodeproj/
│ ├── project.pbxproj
│ └── project.xcworkspace/
│ └── contents.xcworkspacedata
├── FlickToDismiss.podspec
├── LICENSE
├── README.md
└── Source/
└── FlickToDismissViewController.swift
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
## Other
*.xccheckout
*.moved-aside
*.xcuserstate
*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
*.ipa
## Playgrounds
timeline.xctimeline
playground.xcworkspace
# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
.build/
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts
Carthage/Build
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md
fastlane/report.xml
fastlane/screenshots
================================================
FILE: Example/AppDelegate.swift
================================================
//
// AppDelegate.swift
// Example
//
// Created by Jake Lawson on 04/06/2016.
// Copyright © 2016 Jake Lawson. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
func applicationDidEnterBackground(application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillTerminate(application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}
================================================
FILE: Example/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"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"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: Example/Base.lproj/LaunchScreen.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
================================================
FILE: Example/Base.lproj/Main.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Main View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController 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="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5nH-sl-7P9">
<rect key="frame" x="233" y="285" width="134" height="30"/>
<state key="normal" title="Show flickable view"/>
<connections>
<segue destination="XmW-5R-SG1" kind="presentation" modalPresentationStyle="overFullScreen" modalTransitionStyle="crossDissolve" id="466-A7-jAC"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="5nH-sl-7P9" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" id="YB3-jt-X23"/>
<constraint firstItem="5nH-sl-7P9" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="zDy-2u-yd0"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1136" y="124"/>
</scene>
<!--Flick To Dismiss View Controller-->
<scene sceneID="ZqU-Ze-wic">
<objects>
<viewController id="XmW-5R-SG1" customClass="FlickToDismissViewController" customModule="Example" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="wFy-U3-Koc"/>
<viewControllerLayoutGuide type="bottom" id="bxl-jM-wPh"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="ZUO-0n-Gnr">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gA8-yI-JgI">
<rect key="frame" x="160" y="150" width="280" height="300"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AJ3-Ze-KpC">
<rect key="frame" x="20" y="20" width="240" height="21"/>
<color key="backgroundColor" white="0.90045914783344405" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="5wK-U1-M7O"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="B40-gw-kj6">
<rect key="frame" x="20" y="81" width="200" height="21"/>
<color key="backgroundColor" white="0.90000000000000002" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="gwT-Lm-GnX"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lpO-Fe-nB7">
<rect key="frame" x="20" y="110" width="220" height="21"/>
<color key="backgroundColor" white="0.90000000000000002" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="URF-nO-rka"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JmD-qe-yF6">
<rect key="frame" x="20" y="139" width="214" height="21"/>
<color key="backgroundColor" white="0.90000000000000002" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="HAP-Tw-FIo"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="P3O-h1-BYZ">
<rect key="frame" x="20" y="168" width="240" height="21"/>
<color key="backgroundColor" white="0.90000000000000002" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="c6B-Zf-Mz7"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="JmD-qe-yF6" firstAttribute="top" secondItem="lpO-Fe-nB7" secondAttribute="bottom" constant="8" id="9fT-M2-8Hk"/>
<constraint firstItem="P3O-h1-BYZ" firstAttribute="leading" secondItem="gA8-yI-JgI" secondAttribute="leading" constant="20" id="Agj-yR-SaN"/>
<constraint firstItem="P3O-h1-BYZ" firstAttribute="top" secondItem="JmD-qe-yF6" secondAttribute="bottom" constant="8" id="HJZ-QI-bdi"/>
<constraint firstAttribute="trailing" secondItem="lpO-Fe-nB7" secondAttribute="trailing" constant="40" id="P0p-HL-cKu"/>
<constraint firstAttribute="trailing" secondItem="AJ3-Ze-KpC" secondAttribute="trailing" constant="20" id="QuG-wR-vsd"/>
<constraint firstItem="lpO-Fe-nB7" firstAttribute="leading" secondItem="B40-gw-kj6" secondAttribute="leading" id="SuX-uv-VzY"/>
<constraint firstItem="B40-gw-kj6" firstAttribute="top" secondItem="AJ3-Ze-KpC" secondAttribute="bottom" constant="40" id="Uti-f2-toA"/>
<constraint firstAttribute="trailing" secondItem="JmD-qe-yF6" secondAttribute="trailing" constant="46" id="WsA-Vp-Kt9"/>
<constraint firstAttribute="height" constant="300" id="ZsR-1I-hW3"/>
<constraint firstItem="AJ3-Ze-KpC" firstAttribute="leading" secondItem="gA8-yI-JgI" secondAttribute="leading" constant="20" id="cym-BV-Kdm"/>
<constraint firstAttribute="trailing" secondItem="B40-gw-kj6" secondAttribute="trailing" constant="60" id="d0B-lJ-ou3"/>
<constraint firstAttribute="trailing" secondItem="P3O-h1-BYZ" secondAttribute="trailing" constant="20" id="iky-Eu-NeH"/>
<constraint firstItem="AJ3-Ze-KpC" firstAttribute="top" secondItem="gA8-yI-JgI" secondAttribute="top" constant="20" id="ipq-g2-lNa"/>
<constraint firstItem="JmD-qe-yF6" firstAttribute="leading" secondItem="lpO-Fe-nB7" secondAttribute="leading" id="m24-LP-imh"/>
<constraint firstAttribute="width" constant="280" id="r03-cR-Fmu"/>
<constraint firstItem="lpO-Fe-nB7" firstAttribute="top" secondItem="B40-gw-kj6" secondAttribute="bottom" constant="8" id="rAH-Wn-cRN"/>
<constraint firstItem="B40-gw-kj6" firstAttribute="leading" secondItem="gA8-yI-JgI" secondAttribute="leading" constant="20" id="uvl-hY-Aoy"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="0"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lac-WH-Vep">
<rect key="frame" x="270" y="550" width="60" height="30"/>
<state key="normal" title="DISMISS">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="dismissViewController" destination="XmW-5R-SG1" eventType="touchUpInside" id="Zbq-xe-gop"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="WHAT'S NEW" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Yh3-4e-ns0">
<rect key="frame" x="245" y="28" width="111" height="21"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.54117647059999996" green="0.37647058820000001" blue="0.94117647059999998" alpha="0.80000000000000004" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="Yh3-4e-ns0" firstAttribute="top" secondItem="wFy-U3-Koc" secondAttribute="bottom" constant="28" id="Ek5-iN-Jxl"/>
<constraint firstItem="gA8-yI-JgI" firstAttribute="centerX" secondItem="ZUO-0n-Gnr" secondAttribute="centerX" id="KOp-Yy-RYI"/>
<constraint firstItem="gA8-yI-JgI" firstAttribute="centerY" secondItem="ZUO-0n-Gnr" secondAttribute="centerY" id="p3f-Gu-HaL"/>
<constraint firstItem="bxl-jM-wPh" firstAttribute="top" secondItem="lac-WH-Vep" secondAttribute="bottom" constant="20" id="sIb-WS-IUa"/>
<constraint firstItem="lac-WH-Vep" firstAttribute="centerX" secondItem="ZUO-0n-Gnr" secondAttribute="centerX" id="t29-Dc-XxR"/>
<constraint firstItem="Yh3-4e-ns0" firstAttribute="centerX" secondItem="ZUO-0n-Gnr" secondAttribute="centerX" id="tvx-hc-iAN"/>
</constraints>
</view>
<nil key="simulatedStatusBarMetrics"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="animationType" value="Scale"/>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="flickableView" destination="gA8-yI-JgI" id="vwj-Cs-9sp"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="ISy-Ay-pCM" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1835" y="124"/>
</scene>
</scenes>
</document>
================================================
FILE: 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>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
================================================
FILE: Example/MainViewController.swift
================================================
//
// ViewController.swift
// Example
//
// Created by Jake Lawson on 04/06/2016.
// Copyright © 2016 Jake Lawson. All rights reserved.
//
import UIKit
class MainViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
// MARK: Status bar
override func prefersStatusBarHidden() -> Bool {
return true
}
}
================================================
FILE: Example.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
29112E951D034E020094568F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29112E941D034E020094568F /* AppDelegate.swift */; };
29112E971D034E020094568F /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29112E961D034E020094568F /* MainViewController.swift */; };
29112E9A1D034E020094568F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 29112E981D034E020094568F /* Main.storyboard */; };
29112E9C1D034E020094568F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 29112E9B1D034E020094568F /* Assets.xcassets */; };
29112E9F1D034E020094568F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 29112E9D1D034E020094568F /* LaunchScreen.storyboard */; };
29112EB71D034E790094568F /* FlickToDismissViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29112EB61D034E790094568F /* FlickToDismissViewController.swift */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
29112E911D034E020094568F /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
29112E941D034E020094568F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
29112E961D034E020094568F /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
29112E991D034E020094568F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
29112E9B1D034E020094568F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
29112E9E1D034E020094568F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
29112EA01D034E020094568F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
29112EB61D034E790094568F /* FlickToDismissViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FlickToDismissViewController.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
29112E8E1D034E020094568F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
29112E881D034E020094568F = {
isa = PBXGroup;
children = (
29112EB41D034E420094568F /* Source */,
29112E931D034E020094568F /* Example */,
29112E921D034E020094568F /* Products */,
);
sourceTree = "<group>";
};
29112E921D034E020094568F /* Products */ = {
isa = PBXGroup;
children = (
29112E911D034E020094568F /* Example.app */,
);
name = Products;
sourceTree = "<group>";
};
29112E931D034E020094568F /* Example */ = {
isa = PBXGroup;
children = (
29112E941D034E020094568F /* AppDelegate.swift */,
29112EB81D034F040094568F /* Controllers */,
29112EB91D034F0C0094568F /* Storyboards */,
29112E9B1D034E020094568F /* Assets.xcassets */,
29112EA01D034E020094568F /* Info.plist */,
);
path = Example;
sourceTree = "<group>";
};
29112EB41D034E420094568F /* Source */ = {
isa = PBXGroup;
children = (
29112EB61D034E790094568F /* FlickToDismissViewController.swift */,
);
path = Source;
sourceTree = "<group>";
};
29112EB81D034F040094568F /* Controllers */ = {
isa = PBXGroup;
children = (
29112E961D034E020094568F /* MainViewController.swift */,
);
name = Controllers;
sourceTree = "<group>";
};
29112EB91D034F0C0094568F /* Storyboards */ = {
isa = PBXGroup;
children = (
29112E9D1D034E020094568F /* LaunchScreen.storyboard */,
29112E981D034E020094568F /* Main.storyboard */,
);
name = Storyboards;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
29112E901D034E020094568F /* Example */ = {
isa = PBXNativeTarget;
buildConfigurationList = 29112EAE1D034E020094568F /* Build configuration list for PBXNativeTarget "Example" */;
buildPhases = (
29112E8D1D034E020094568F /* Sources */,
29112E8E1D034E020094568F /* Frameworks */,
29112E8F1D034E020094568F /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Example;
productName = Example;
productReference = 29112E911D034E020094568F /* Example.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
29112E891D034E020094568F /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0730;
ORGANIZATIONNAME = "Jake Lawson";
TargetAttributes = {
29112E901D034E020094568F = {
CreatedOnToolsVersion = 7.3.1;
};
};
};
buildConfigurationList = 29112E8C1D034E020094568F /* Build configuration list for PBXProject "Example" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 29112E881D034E020094568F;
productRefGroup = 29112E921D034E020094568F /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
29112E901D034E020094568F /* Example */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
29112E8F1D034E020094568F /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
29112E9F1D034E020094568F /* LaunchScreen.storyboard in Resources */,
29112E9C1D034E020094568F /* Assets.xcassets in Resources */,
29112E9A1D034E020094568F /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
29112E8D1D034E020094568F /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
29112E971D034E020094568F /* MainViewController.swift in Sources */,
29112EB71D034E790094568F /* FlickToDismissViewController.swift in Sources */,
29112E951D034E020094568F /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
29112E981D034E020094568F /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
29112E991D034E020094568F /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
29112E9D1D034E020094568F /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
29112E9E1D034E020094568F /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
29112EAC1D034E020094568F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
29112EAD1D034E020094568F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
29112EAF1D034E020094568F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = Example/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.jakelawson.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
29112EB01D034E020094568F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = Example/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.jakelawson.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
29112E8C1D034E020094568F /* Build configuration list for PBXProject "Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
29112EAC1D034E020094568F /* Debug */,
29112EAD1D034E020094568F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
29112EAE1D034E020094568F /* Build configuration list for PBXNativeTarget "Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
29112EAF1D034E020094568F /* Debug */,
29112EB01D034E020094568F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 29112E891D034E020094568F /* Project object */;
}
================================================
FILE: 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: FlickToDismiss.podspec
================================================
Pod::Spec.new do |s|
s.name = "FlickToDismiss"
s.version = "0.9"
s.summary = "A basic UIViewController class that presents a UIView which can be dismissed by flicking it off the screen."
s.description = <<-DESC
FlickToDismiss is written in Swift and utilises UIKit Dynamics. It allows for a UIView to be flicked off the screen which dismisses the presenting view controller.
DESC
s.homepage = "https://github.com/jakelawson1/FlickToDismiss"
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { "Jake Lawson" => "jakelawson1@hotmail.com" }
s.source = { :git => "https://github.com/jakelawson1/FlickToDismiss.git", :tag => "#{s.version}" }
s.platform = :ios, "8.0"
s.source_files = 'Source/**'
s.framework = "UIKit"
end
================================================
FILE: LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2016 Jake
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: README.md
================================================
# FlickToDismiss

## Requirements
- iOS 8.0+
- Xcode 7.3
## Installation
### CocoaPods
[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:
```bash
$ gem install cocoapods
```
To integrate FlickToDismiss into your Xcode project using CocoaPods, specify it in your `Podfile`:
```ruby
pod 'FlickToDismiss', '~> 0.9'
```
Then, run the following command:
```bash
$ pod install
```
### Manual
Add [FlickToDismissViewController.swift](Source/FlickToDismissViewController.swift) to your project in Xcode.
## Usage
### Interface Builder
1. Drag a new `UIViewController` object onto your storyboard.
2. Set the class to `FlickToDismissViewController`.
3. Drag a `UIView` object onto the View Controller.
4. Add any necessary constraints.
5. Connect the `flickableView` outlet to the `UIView` in the Connections inspector.
6. Job done.
### Programatically
```swift
let viewToFlick = UIView(frame: CGRect(x: 0, y: 0, width: 280, height: 300))
viewToFlick.backgroundColor = .whiteColor()
// Optional - See FlickToDismissOption for available options.
let options: [FlickToDismissOption] = [
.Animation(.Scale),
.BackgroundColor(UIColor(white: 0.0, alpha: 0.8))
]
let vc = FlickToDismissViewController(flickableView: viewToFlick, options: options)
vc.modalTransitionStyle = .CrossDissolve
vc.modalPresentationStyle = .OverFullScreen
presentViewController(vc, animated: true, completion: nil)
```
#### Hint - Subclassing UIView
Since Auto Layout sizes views according to their frames, it incorrectly assumes it has a larger space to lay things out when a view is rotated. To correct this we need to supply the method `alignmentRectForFrame()` in the view subclass:
```swift
override func alignmentRectForFrame(frame: CGRect) -> CGRect {
return bounds
}
```
## License
FlickToDismiss is licensed under the MIT License. See [LICENSE](LICENSE) for details.
Let me know if you use FlickToDismiss in your projects, I would love to know!
================================================
FILE: Source/FlickToDismissViewController.swift
================================================
//
// FlickToDismissViewController.swift
// Example
//
// Created by Jake Lawson on 04/06/2016.
// Copyright © 2016 Jake Lawson. All rights reserved.
//
import UIKit
/// Options used to customize the appearance and interaction.
public enum FlickToDismissOption {
case BackgroundColor(UIColor)
case FlickThreshold(CGFloat)
case FlickVelocityMultiplier(CGFloat)
case SnapDamping(CGFloat)
case Animation(AnimationType)
}
/// Different animation styles for presenting the flickable view.
public enum AnimationType: String {
case None
case Scale
}
/// Presents a UIView which can dismissed by flicking it off the screen.
@IBDesignable
public class FlickToDismissViewController: UIViewController {
// MARK:- Properties
/// Flickable UIView.
@IBOutlet public var flickableView: UIView!
private var panGestureRecognizer: UIPanGestureRecognizer!
/// Array of FlickToDismissOptions.
private var options: [FlickToDismissOption]?
/// Indicates how fast the view must be moving in order to have the view continue moving.
@IBInspectable public var flickThreshold: CGFloat = 1000
/// The amount of oscillation of the flickableView during the conclusion of a snap.
@IBInspectable public var snapDamping: CGFloat = 0.5
/// Affects how fast or slow the view is flicked off the screen.
@IBInspectable public var flickVelocityMultiplier: CGFloat = 0.2
/// Animation presentation type. See AnimationType for all possible values.
@IBInspectable public var animationType: String = "None"
/// The point for the flickable view to return to if the view was not flicked off the screen
public var originalCenter: CGPoint?
// UIKit Dynamics
private var animator: UIDynamicAnimator!
private var attachmentBehavior: UIAttachmentBehavior!
private var snapBehaviour: UISnapBehavior!
private var pushBehaviour: UIPushBehavior!
// MARK:- Life Cycle
public init(flickableView: UIView, options: [FlickToDismissOption]?) {
super.init(nibName: nil, bundle: nil)
self.flickableView = flickableView
self.options = options
}
required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
public override func viewDidLoad() {
super.viewDidLoad()
setup()
}
public override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
// Perform animation when view will appear
switch AnimationType.init(rawValue: animationType) ?? .None {
case .Scale:
UIView.animateWithDuration(0.5, delay: 0.0, usingSpringWithDamping: 0.8, initialSpringVelocity: 5.0, options: .CurveEaseInOut, animations: ({
self.flickableView.transform = CGAffineTransformIdentity
self.flickableView.alpha = 1.0
}), completion: nil)
default:
break
}
}
// MARK:- Setup
private func setup() {
// Setup pan gesture
panGestureRecognizer = UIPanGestureRecognizer(target: self, action: #selector(FlickToDismissViewController.handleAttachmentGesture(_:)))
// Setup animator
animator = UIDynamicAnimator(referenceView: view)
// Apply options
if let options = options {
for option in options {
switch option {
case .BackgroundColor(let color):
view.backgroundColor = color
case .FlickThreshold(let threshold):
flickThreshold = threshold
case .FlickVelocityMultiplier(let multiplier):
flickVelocityMultiplier = multiplier
case .SnapDamping(let damping):
snapDamping = damping
case .Animation(let animation):
animationType = animation.rawValue
}
}
}
// Setup animation
switch AnimationType.init(rawValue: animationType) ?? .None {
case .Scale:
flickableView.transform = CGAffineTransformMakeScale(0.8, 0.8)
flickableView.alpha = 0.0
default:
break
}
flickableView.addGestureRecognizer(panGestureRecognizer)
// If there are no constraints, center the view
if flickableView.constraints.count == 0 {
flickableView.center = view.center
}
view.addSubview(flickableView)
}
// MARK: Layout
public override func viewDidLayoutSubviews() {
// Only set the center if the view has constraints
if flickableView.constraints.count != 0 {
originalCenter = flickableView.center
}
}
// MARK:- Pan Gesture
@objc private func handleAttachmentGesture(panGesture: UIPanGestureRecognizer) {
let location = panGesture.locationInView(view)
let boxLocation = panGesture.locationInView(flickableView)
switch panGesture.state {
case .Began:
animator.removeAllBehaviors()
let centerOffset = UIOffset(horizontal: boxLocation.x-flickableView.bounds.midX, vertical: boxLocation.y-flickableView.bounds.midY)
attachmentBehavior = UIAttachmentBehavior(item: flickableView, offsetFromCenter: centerOffset, attachedToAnchor: location)
animator.addBehavior(attachmentBehavior)
case .Ended:
animator.removeAllBehaviors()
let velocity = panGesture.velocityInView(view)
let magnitude = sqrt((velocity.x * velocity.x) + (velocity.y * velocity.y))
guard magnitude > flickThreshold else {
snapBehaviour = UISnapBehavior(item: flickableView, snapToPoint: originalCenter ?? view.center)
snapBehaviour.damping = snapDamping
animator.addBehavior(snapBehaviour)
return
}
let centerOffset = UIOffset(horizontal: boxLocation.x-flickableView.bounds.midX, vertical: boxLocation.y-flickableView.bounds.midY)
pushBehaviour = UIPushBehavior(items: [flickableView], mode: .Instantaneous)
pushBehaviour.pushDirection = CGVector(dx: velocity.x, dy: velocity.y)
pushBehaviour.setTargetOffsetFromCenter(centerOffset, forItem: flickableView)
pushBehaviour.magnitude = magnitude * flickVelocityMultiplier
animator.addBehavior(pushBehaviour)
dismissViewControllerAnimated(true, completion: nil)
default:
attachmentBehavior.anchorPoint = location
}
}
// MARK:- Helpers
/// Connect this to a button to dismiss the view controller.
@IBAction public func dismissViewController() {
dismissViewControllerAnimated(true, completion: nil)
}
// MARK:- Rotation
public override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
// Remove behaviors on rotation in order to satisfy constraints
animator.removeAllBehaviors()
// Center view if there are no constraints
if flickableView.constraints.count == 0 {
flickableView.center = CGPoint(x: size.width/2, y: size.height/2)
}
}
}
gitextract_zm9hqyrn/
├── .gitignore
├── Example/
│ ├── AppDelegate.swift
│ ├── Assets.xcassets/
│ │ └── AppIcon.appiconset/
│ │ └── Contents.json
│ ├── Base.lproj/
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ └── MainViewController.swift
├── Example.xcodeproj/
│ ├── project.pbxproj
│ └── project.xcworkspace/
│ └── contents.xcworkspacedata
├── FlickToDismiss.podspec
├── LICENSE
├── README.md
└── Source/
└── FlickToDismissViewController.swift
Condensed preview — 13 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (53K chars).
[
{
"path": ".gitignore",
"chars": 1378,
"preview": "# Xcode\n#\n# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore\n\n"
},
{
"path": "Example/AppDelegate.swift",
"chars": 2144,
"preview": "//\n// AppDelegate.swift\n// Example\n//\n// Created by Jake Lawson on 04/06/2016.\n// Copyright © 2016 Jake Lawson. All "
},
{
"path": "Example/Assets.xcassets/AppIcon.appiconset/Contents.json",
"chars": 1077,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"iphone\",\n \"size\" : \"29x29\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\""
},
{
"path": "Example/Base.lproj/LaunchScreen.storyboard",
"chars": 1665,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "Example/Base.lproj/Main.storyboard",
"chars": 16692,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "Example/Info.plist",
"chars": 1495,
"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/MainViewController.swift",
"chars": 622,
"preview": "//\n// ViewController.swift\n// Example\n//\n// Created by Jake Lawson on 04/06/2016.\n// Copyright © 2016 Jake Lawson. A"
},
{
"path": "Example.xcodeproj/project.pbxproj",
"chars": 11923,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "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": "FlickToDismiss.podspec",
"chars": 837,
"preview": "Pod::Spec.new do |s|\n s.name = \"FlickToDismiss\"\n s.version = \"0.9\"\n s.summary = \"A basic UIViewCont"
},
{
"path": "LICENSE",
"chars": 1071,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2016 Jake\n\nPermission is hereby granted, free of charge, to any person obtaining a "
},
{
"path": "README.md",
"chars": 2063,
"preview": "# FlickToDismiss\n\n\n\n## Requirements\n\n- iOS 8.0+\n- Xcode 7.3\n\n## Installa"
},
{
"path": "Source/FlickToDismissViewController.swift",
"chars": 7323,
"preview": "//\n// FlickToDismissViewController.swift\n// Example\n//\n// Created by Jake Lawson on 04/06/2016.\n// Copyright © 2016 "
}
]
About this extraction
This page contains the full source code of the jakelawson1/FlickToDismiss GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 13 files (47.3 KB), approximately 12.6k 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.