Repository: LiorNn/DragDropCollectionView
Branch: master
Commit: 5d1d3ef8d82f
Files: 20
Total size: 66.6 KB
Directory structure:
gitextract_dhodvlri/
├── DragDropCollectionView.swift
├── README.md
└── Sample Project/
├── DragDrop/
│ ├── AppDelegate.swift
│ ├── Base.lproj/
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets/
│ │ └── AppIcon.appiconset/
│ │ └── Contents.json
│ ├── Info.plist
│ └── ViewController.swift
├── DragDrop.xcodeproj/
│ ├── project.pbxproj
│ ├── project.xcworkspace/
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata/
│ │ ├── Lior.xcuserdatad/
│ │ │ └── UserInterfaceState.xcuserstate
│ │ └── prog.xcuserdatad/
│ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata/
│ ├── Lior.xcuserdatad/
│ │ ├── xcdebugger/
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes/
│ │ ├── DragDrop.xcscheme
│ │ └── xcschememanagement.plist
│ └── prog.xcuserdatad/
│ ├── xcdebugger/
│ │ └── Breakpoints_v2.xcbkptlist
│ └── xcschemes/
│ └── xcschememanagement.plist
└── DragDropTests/
├── DragDropTests.swift
└── Info.plist
================================================
FILE CONTENTS
================================================
================================================
FILE: DragDropCollectionView.swift
================================================
//
// DragDropCollectionView.swift
// DragDrop
//
// Created by Lior Neu-ner on 2014/12/30.
// Copyright (c) 2014 LiorN. All rights reserved.
// 3rd test for git submodule
//Just testing git subtree for the second time
import UIKit
@objc protocol DrapDropCollectionViewDelegate {
func dragDropCollectionViewDidMoveCellFromInitialIndexPath(_ initialIndexPath: IndexPath, toNewIndexPath newIndexPath: IndexPath)
@objc optional func dragDropCollectionViewDraggingDidBeginWithCellAtIndexPath(_ indexPath: IndexPath)
@objc optional func dragDropCollectionViewDraggingDidEndForCellAtIndexPath(_ indexPath: IndexPath)
}
class DragDropCollectionView: UICollectionView, UIGestureRecognizerDelegate {
weak var draggingDelegate: DrapDropCollectionViewDelegate?
var longPressRecognizer: UILongPressGestureRecognizer = {
let longPressRecognizer = UILongPressGestureRecognizer()
longPressRecognizer.delaysTouchesBegan = false
longPressRecognizer.cancelsTouchesInView = false
longPressRecognizer.numberOfTouchesRequired = 1
longPressRecognizer.minimumPressDuration = 0.1
longPressRecognizer.allowableMovement = 10.0
return longPressRecognizer
}()
fileprivate var draggedCellIndexPath: IndexPath?
var draggingView: UIView?
fileprivate var touchOffsetFromCenterOfCell: CGPoint?
var isWiggling = false
fileprivate let pingInterval = 0.3
var isAutoScrolling = false
override var intrinsicContentSize: CGSize {
self.layoutIfNeeded()
return CGSize(width: UIView.noIntrinsicMetric, height: self.contentSize.height)
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
commonInit()
}
override init(frame: CGRect, collectionViewLayout layout: UICollectionViewLayout) {
super.init(frame: frame, collectionViewLayout: layout)
commonInit()
}
fileprivate func commonInit() {
longPressRecognizer.addTarget(self, action: #selector(DragDropCollectionView.handleLongPress(_:)))
longPressRecognizer.isEnabled = false
self.addGestureRecognizer(longPressRecognizer)
}
override func reloadData() {
super.reloadData()
self.invalidateIntrinsicContentSize()
}
@objc func handleLongPress(_ longPressRecognizer: UILongPressGestureRecognizer) {
let touchLocation = longPressRecognizer.location(in: self)
switch (longPressRecognizer.state) {
case UIGestureRecognizerState.began:
draggedCellIndexPath = self.indexPathForItem(at: touchLocation)
if (draggedCellIndexPath != nil) {
draggingDelegate?.dragDropCollectionViewDraggingDidBeginWithCellAtIndexPath?(draggedCellIndexPath!)
let draggedCell = self.cellForItem(at: draggedCellIndexPath! as IndexPath) as UICollectionViewCell?
draggingView = UIImageView(image: getRasterizedImageCopyOfCell(draggedCell!))
draggingView!.center = (draggedCell!.center)
self.addSubview(draggingView!)
draggedCell!.alpha = 0.0
touchOffsetFromCenterOfCell = CGPoint(x: draggedCell!.center.x - touchLocation.x, y: draggedCell!.center.y - touchLocation.y)
UIView.animate(withDuration: 0.4, animations: { () -> Void in
self.draggingView!.transform = CGAffineTransform(scaleX: 1.3, y: 1.3)
self.draggingView!.alpha = 0.8
})
}
case UIGestureRecognizerState.changed:
if draggedCellIndexPath != nil {
draggingView!.center = CGPoint(x: touchLocation.x + touchOffsetFromCenterOfCell!.x, y: touchLocation.y + touchOffsetFromCenterOfCell!.y)
if !isAutoScrolling {
dispatchOnMainQueueAfter(pingInterval, closure: { () -> () in
let scroller = self.shouldAutoScroll(touchLocation)
if (scroller.shouldScroll) {
self.autoScroll(scroller.direction)
self.isAutoScrolling = true
}
})
}
dispatchOnMainQueueAfter(pingInterval, closure: { () -> () in
let shouldSwapCellsTuple = self.shouldSwapCells(touchLocation)
if shouldSwapCellsTuple.shouldSwap {
self.swapDraggedCellWithCellAtIndexPath(shouldSwapCellsTuple.newIndexPath!)
}
})
}
case UIGestureRecognizerState.ended:
if draggedCellIndexPath != nil {
draggingDelegate?.dragDropCollectionViewDraggingDidEndForCellAtIndexPath?(draggedCellIndexPath!)
let draggedCell = self.cellForItem(at: draggedCellIndexPath! as IndexPath)
UIView.animate(withDuration: 0.4, animations: { () -> Void in
self.draggingView!.transform = CGAffineTransform.identity
self.draggingView!.alpha = 1.0
if (draggedCell != nil) {
self.draggingView!.center = draggedCell!.center
}
}, completion: { (finished) -> Void in
self.draggingView!.removeFromSuperview()
self.draggingView = nil
draggedCell?.alpha = 1.0
self.draggedCellIndexPath = nil
})
}
default: ()
}
}
func enableDragging(_ enable: Bool) {
if enable {
longPressRecognizer.isEnabled = true
} else {
longPressRecognizer.isEnabled = false
}
}
fileprivate func shouldSwapCells(_ previousTouchLocation: CGPoint) -> (shouldSwap: Bool, newIndexPath: IndexPath?) {
var shouldSwap = false
var newIndexPath: IndexPath?
let currentTouchLocation = self.longPressRecognizer.location(in: self)
if !Double(currentTouchLocation.x).isNaN && !Double(currentTouchLocation.y).isNaN {
if distanceBetweenPoints(previousTouchLocation, secondPoint: currentTouchLocation) < CGFloat(20.0) {
if let newIndexPathForCell = self.indexPathForItem(at: currentTouchLocation) {
if newIndexPathForCell != self.draggedCellIndexPath! as IndexPath {
shouldSwap = true
newIndexPath = newIndexPathForCell
}
}
}
}
return (shouldSwap, newIndexPath)
}
fileprivate func swapDraggedCellWithCellAtIndexPath(_ newIndexPath: IndexPath) {
self.moveItem(at: self.draggedCellIndexPath! as IndexPath, to: newIndexPath as IndexPath)
let draggedCell = self.cellForItem(at: newIndexPath as IndexPath)!
draggedCell.alpha = 0
self.draggingDelegate?.dragDropCollectionViewDidMoveCellFromInitialIndexPath(self.draggedCellIndexPath!, toNewIndexPath: newIndexPath)
self.draggedCellIndexPath = newIndexPath
}
}
//AutoScroll
extension DragDropCollectionView {
enum AutoScrollDirection: Int {
case invalid = 0
case towardsOrigin = 1
case awayFromOrigin = 2
}
func autoScroll(_ direction: AutoScrollDirection) {
let currentLongPressTouchLocation = self.longPressRecognizer.location(in: self)
var increment: CGFloat
var newContentOffset: CGPoint
if (direction == AutoScrollDirection.towardsOrigin) {
increment = -50.0
} else {
increment = 50.0
}
newContentOffset = CGPoint(x: self.contentOffset.x, y: self.contentOffset.y + increment)
let flowLayout = self.collectionViewLayout as! UICollectionViewFlowLayout
if flowLayout.scrollDirection == UICollectionView.ScrollDirection.horizontal{
newContentOffset = CGPoint(x: self.contentOffset.x + increment, y: self.contentOffset.y)
}
if ((direction == AutoScrollDirection.towardsOrigin && newContentOffset.y < 0) || (direction == AutoScrollDirection.awayFromOrigin && newContentOffset.y > self.contentSize.height - self.frame.height)) {
dispatchOnMainQueueAfter(0.3, closure: { () -> () in
self.isAutoScrolling = false
})
} else {
UIView.animate(withDuration: 0.3
, delay: 0.0
, options: UIView.AnimationOptions.curveLinear
, animations: { () -> Void in
self.setContentOffset(newContentOffset, animated: false)
if (self.draggingView != nil) {
if flowLayout.scrollDirection == UICollectionView.ScrollDirection.vertical{
var draggingFrame = self.draggingView!.frame
draggingFrame.origin.y += increment
self.draggingView!.frame = draggingFrame
}else{
var draggingFrame = self.draggingView!.frame
draggingFrame.origin.x += increment
self.draggingView!.frame = draggingFrame
}
}
}) { (finished) -> Void in
dispatchOnMainQueueAfter(0.0, closure: { () -> () in
var updatedTouchLocationWithNewOffset = CGPoint(x: currentLongPressTouchLocation.x, y: currentLongPressTouchLocation.y + increment)
if flowLayout.scrollDirection == UICollectionView.ScrollDirection.horizontal{
updatedTouchLocationWithNewOffset = CGPoint(x: currentLongPressTouchLocation.x + increment, y: currentLongPressTouchLocation.y)
}
let scroller = self.shouldAutoScroll(updatedTouchLocationWithNewOffset)
if scroller.shouldScroll {
self.autoScroll(scroller.direction)
} else {
self.isAutoScrolling = false
}
})
}
}
}
func shouldAutoScroll(_ previousTouchLocation: CGPoint) -> (shouldScroll: Bool, direction: AutoScrollDirection) {
let previousTouchLocation = self.convert(previousTouchLocation, to: self.superview)
let currentTouchLocation = self.longPressRecognizer.location(in: self.superview)
if let flowLayout = self.collectionViewLayout as? UICollectionViewFlowLayout {
if !Double(currentTouchLocation.x).isNaN && !Double(currentTouchLocation.y).isNaN {
if distanceBetweenPoints(previousTouchLocation, secondPoint: currentTouchLocation) < CGFloat(20.0) {
let scrollDirection = flowLayout.scrollDirection
var scrollBoundsSize: CGSize
let scrollBoundsLength: CGFloat = 50.0
var scrollRectAtEnd: CGRect
switch scrollDirection {
case UICollectionViewScrollDirection.horizontal:
scrollBoundsSize = CGSize(width: scrollBoundsLength, height: self.frame.height)
scrollRectAtEnd = CGRect(x: self.frame.origin.x + self.frame.width - scrollBoundsSize.width , y: self.frame.origin.y, width: scrollBoundsSize.width, height: self.frame.height)
case UICollectionViewScrollDirection.vertical:
scrollBoundsSize = CGSize(width: self.frame.width, height: scrollBoundsLength)
scrollRectAtEnd = CGRect(x: self.frame.origin.x, y: self.frame.origin.y + self.frame.height - scrollBoundsSize.height, width: self.frame.width, height: scrollBoundsSize.height)
}
let scrollRectAtOrigin = CGRect(origin: self.frame.origin, size: scrollBoundsSize)
if scrollRectAtOrigin.contains(currentTouchLocation) {
return (true, AutoScrollDirection.towardsOrigin)
} else if scrollRectAtEnd.contains(currentTouchLocation) {
return (true, AutoScrollDirection.awayFromOrigin)
}
}
}
}
return (false, AutoScrollDirection.invalid)
}
}
//Wiggle Animation
extension DragDropCollectionView {
func startWiggle() {
for cell in visibleCells {
addWiggleAnimationTo(cell )
}
isWiggling = true
}
func stopWiggle() {
for cell in visibleCells {
cell.layer.removeAllAnimations()
}
isWiggling = false
}
override func dequeueReusableCell(withReuseIdentifier identifier: String, for indexPath: IndexPath) -> UICollectionViewCell {
let cell: AnyObject = super.dequeueReusableCell(withReuseIdentifier: identifier, for: indexPath as IndexPath)
if isWiggling {
addWiggleAnimationTo(cell as! UICollectionViewCell)
} else {
cell.layer.removeAllAnimations()
}
return cell as! UICollectionViewCell
}
func addWiggleAnimationTo(_ cell: UICollectionViewCell) {
CATransaction.begin()
CATransaction.setDisableActions(false)
cell.layer.add(rotationAnimation(), forKey: "rotation")
cell.layer.add(bounceAnimation(), forKey: "bounce")
CATransaction.commit()
}
fileprivate func rotationAnimation() -> CAKeyframeAnimation {
let animation = CAKeyframeAnimation(keyPath: "transform.rotation.z")
let angle = CGFloat(0.04)
let duration = TimeInterval(0.1)
let variance = Double(0.025)
animation.values = [angle, -angle]
animation.autoreverses = true
animation.duration = self.randomize(duration, withVariance: variance)
animation.repeatCount = Float.infinity
return animation
}
fileprivate func bounceAnimation() -> CAKeyframeAnimation {
let animation = CAKeyframeAnimation(keyPath: "transform.translation.y")
let bounce = CGFloat(3.0)
let duration = TimeInterval(0.12)
let variance = Double(0.025)
animation.values = [bounce, -bounce]
animation.autoreverses = true
animation.duration = self.randomize(duration, withVariance: variance)
animation.repeatCount = Float.infinity
return animation
}
fileprivate func randomize(_ interval: TimeInterval, withVariance variance:Double) -> TimeInterval {
let random = (Double(arc4random_uniform(1000)) - 500.0) / 500.0
return interval + variance * random;
}
}
//Assisting Functions
extension DragDropCollectionView {
func getRasterizedImageCopyOfCell(_ cell: UICollectionViewCell) -> UIImage {
UIGraphicsBeginImageContextWithOptions(cell.bounds.size, false, 0.0)
cell.layer.render(in: UIGraphicsGetCurrentContext()!)
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
return image!
}
}
public func dispatchOnMainQueueAfter(_ delay:Double, closure:@escaping ()->Void) {
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now()+delay, qos: DispatchQoS.userInteractive, flags: DispatchWorkItemFlags.enforceQoS, execute: closure)
}
public func distanceBetweenPoints(_ firstPoint: CGPoint, secondPoint: CGPoint) -> CGFloat {
let xDistance = firstPoint.x - secondPoint.x
let yDistance = firstPoint.y - secondPoint.y
return sqrt(xDistance * xDistance + yDistance * yDistance)
}
================================================
FILE: README.md
================================================
# DragDropCollectionView
A UICollectionView which allows for easy drag and drop to reorder cells. Mimicks the drag and drop on the iOS Springboard when reordering apps (wiggle animation included!).
I have also included automatic scrolling for when the collection view's content does not all fit in the frame

Installation
--------------
To use the DragDropCollectionView class in an app, just drag the DragDropCollectionView.swift file into your project.
Protocols and Delegates
--------------
DragDropCollectionView has the following protocol:
````
@objc protocol DrapDropCollectionViewDelegate: UICollectionViewDelegate
````
This inherits from UICollectionViewDelegate and is to be used in place of the '.delegate' property found in UICollectionView
DragDropCollectionView has the following delegate:
````
weak var draggingDelegate: DrapDropCollectionViewDelegate?
````
The DragDropCollectionViewDelegate has the following required methods:
````
func dragDropCollectionViewDidMoveCellFromInitialIndexPath(initialIndexPath: NSIndexPath, toNewIndexPath newIndexPath: NSIndexPath)
````
This method should be used in your to 'swap' items in your datasource
The DragDropCollectionViewDelegate has the following optional methods:
````
optional func dragDropCollectionViewDraggingDidBeginWithCellAtIndexPath(indexPath: NSIndexPath)
optional func dragDropCollectionViewDraggingDidEndForCellAtIndexPath(indexPath: NSIndexPath)
````
Methods
--------------
Dragging can be easily enabled and disabled using the follwing method:
````
func enableDragging(enable: Bool)
````
To start the wiggle animation, use:
````
func startWiggle()
````
To stop the wiggle animation, use:
````
func stopWiggle()
````
================================================
FILE: Sample Project/DragDrop/AppDelegate.swift
================================================
//
// AppDelegate.swift
// DragDrop
//
// Created by Lior Neu-ner on 2014/12/30.
// Copyright (c) 2014 LiorN. 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: Sample Project/DragDrop/Base.lproj/LaunchScreen.xib
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2014 LiorN. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="DragDrop" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="548" y="455"/>
</view>
</objects>
</document>
================================================
FILE: Sample Project/DragDrop/Base.lproj/Main.storyboard
================================================
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_1" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="DragDrop" 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="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="3XC-yT-77i">
<rect key="frame" x="535" y="28" width="51" height="31"/>
<connections>
<action selector="toggleWiggleWithSender:" destination="BYZ-38-t0r" eventType="valueChanged" id="Lba-dR-HMI"/>
</connections>
</switch>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Wiggle" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Huo-f5-Ayv">
<rect key="frame" x="454" y="33" width="58" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="58" id="fJH-FD-6s1"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="qon-Be-cyL" customClass="DragDropCollectionView" customModule="DragDrop" customModuleProvider="target">
<rect key="frame" x="0.0" y="91" width="414" height="771"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="aOa-Ji-BPD">
<size key="itemSize" width="73" height="62"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="collectionViewCell" id="G4Y-1C-eVJ">
<rect key="frame" x="0.0" y="0.0" width="73" height="62"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="73" height="62"/>
<autoresizingMask key="autoresizingMask"/>
</view>
</collectionViewCell>
</cells>
<connections>
<outlet property="dataSource" destination="BYZ-38-t0r" id="w5A-fg-KHE"/>
</connections>
</collectionView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="3XC-yT-77i" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" constant="8" symbolic="YES" id="3QM-cH-Oih"/>
<constraint firstAttribute="trailing" secondItem="qon-Be-cyL" secondAttribute="trailing" id="OTe-te-VhB"/>
<constraint firstItem="3XC-yT-77i" firstAttribute="centerY" secondItem="Huo-f5-Ayv" secondAttribute="centerY" id="S7V-QC-45J"/>
<constraint firstItem="3XC-yT-77i" firstAttribute="trailing" secondItem="8bC-Xf-vdC" secondAttribute="trailingMargin" id="YfL-sm-t64"/>
<constraint firstItem="qon-Be-cyL" firstAttribute="top" secondItem="3XC-yT-77i" secondAttribute="bottom" constant="8" symbolic="YES" id="iU0-4L-JXk"/>
<constraint firstItem="3XC-yT-77i" firstAttribute="leading" secondItem="Huo-f5-Ayv" secondAttribute="trailing" constant="23" id="ldw-GC-4nP"/>
<constraint firstItem="qon-Be-cyL" firstAttribute="bottom" secondItem="wfy-db-euE" secondAttribute="top" id="loV-4y-bmH"/>
<constraint firstItem="qon-Be-cyL" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="r7R-GF-f6A"/>
</constraints>
</view>
<connections>
<outlet property="dragDropCollectionView" destination="qon-Be-cyL" id="I4j-uv-k2o"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="489" y="336"/>
</scene>
</scenes>
</document>
================================================
FILE: Sample Project/DragDrop/Images.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: Sample Project/DragDrop/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: Sample Project/DragDrop/ViewController.swift
================================================
//
// ViewController.swift
// DragDrop
//
// Created by Lior Neu-ner on 2014/12/30.
// Copyright (c) 2014 LiorN. All rights reserved.
//
import UIKit
class ViewController: UIViewController, UICollectionViewDataSource, DrapDropCollectionViewDelegate {
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "collectionViewCell", for: indexPath as IndexPath) as UICollectionViewCell
cell.backgroundColor = colors[indexPath.row]
return cell
}
func dragDropCollectionViewDidMoveCellFromInitialIndexPath(_ initialIndexPath: IndexPath, toNewIndexPath newIndexPath: IndexPath) {
let colorToMove = colors[initialIndexPath.row]
colors.remove(at: initialIndexPath.row)
colors.insert(colorToMove, at: newIndexPath.row)
}
@IBOutlet var dragDropCollectionView: DragDropCollectionView!
var colors: [UIColor] = {
var randomColors = [UIColor]()
for i in 1...500 {
let randomRed = CGFloat(arc4random() % 255) / 255.0
let randomGreen = CGFloat(arc4random() % 255) / 255.0
let randomBlue = CGFloat(arc4random() % 255) / 255.0
randomColors.append(UIColor(red: randomRed, green: randomGreen, blue: randomBlue, alpha: 1.0))
}
return randomColors
}()
override func viewDidLoad() {
super.viewDidLoad()
dragDropCollectionView.draggingDelegate = self
dragDropCollectionView.enableDragging(true)
}
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return colors.count
}
@IBAction func toggleWiggle(sender: UISwitch) {
if sender.isOn {
dragDropCollectionView.startWiggle()
} else {
dragDropCollectionView.stopWiggle()
}
}
}
================================================
FILE: Sample Project/DragDrop.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
BA18A7C21A649C8D0044B197 /* DragDropCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA18A7C11A649C8D0044B197 /* DragDropCollectionView.swift */; };
BA6E6D401A529CAE0005985D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA6E6D3F1A529CAE0005985D /* AppDelegate.swift */; };
BA6E6D421A529CAF0005985D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA6E6D411A529CAF0005985D /* ViewController.swift */; };
BA6E6D451A529CAF0005985D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BA6E6D431A529CAF0005985D /* Main.storyboard */; };
BA6E6D471A529CB00005985D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BA6E6D461A529CB00005985D /* Images.xcassets */; };
BA6E6D4A1A529CB00005985D /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = BA6E6D481A529CB00005985D /* LaunchScreen.xib */; };
BA6E6D561A529CB20005985D /* DragDropTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA6E6D551A529CB20005985D /* DragDropTests.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
BA6E6D501A529CB10005985D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BA6E6D321A529CAC0005985D /* Project object */;
proxyType = 1;
remoteGlobalIDString = BA6E6D391A529CAD0005985D;
remoteInfo = DragDrop;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
BA18A7C11A649C8D0044B197 /* DragDropCollectionView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DragDropCollectionView.swift; path = ../../DragDropCollectionView.swift; sourceTree = "<group>"; };
BA6E6D3A1A529CAD0005985D /* DragDrop.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DragDrop.app; sourceTree = BUILT_PRODUCTS_DIR; };
BA6E6D3E1A529CAD0005985D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
BA6E6D3F1A529CAE0005985D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
BA6E6D411A529CAF0005985D /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
BA6E6D441A529CAF0005985D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
BA6E6D461A529CB00005985D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
BA6E6D491A529CB00005985D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
BA6E6D4F1A529CB10005985D /* DragDropTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DragDropTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
BA6E6D541A529CB10005985D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
BA6E6D551A529CB20005985D /* DragDropTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DragDropTests.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
BA6E6D371A529CAD0005985D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
BA6E6D4C1A529CB10005985D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
BA6E6D311A529CAC0005985D = {
isa = PBXGroup;
children = (
BA6E6D3C1A529CAD0005985D /* DragDrop */,
BA6E6D521A529CB10005985D /* DragDropTests */,
BA6E6D3B1A529CAD0005985D /* Products */,
);
sourceTree = "<group>";
};
BA6E6D3B1A529CAD0005985D /* Products */ = {
isa = PBXGroup;
children = (
BA6E6D3A1A529CAD0005985D /* DragDrop.app */,
BA6E6D4F1A529CB10005985D /* DragDropTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
BA6E6D3C1A529CAD0005985D /* DragDrop */ = {
isa = PBXGroup;
children = (
BA6E6D3F1A529CAE0005985D /* AppDelegate.swift */,
BA6E6D411A529CAF0005985D /* ViewController.swift */,
BA18A7C11A649C8D0044B197 /* DragDropCollectionView.swift */,
BA6E6D431A529CAF0005985D /* Main.storyboard */,
BA6E6D461A529CB00005985D /* Images.xcassets */,
BA6E6D481A529CB00005985D /* LaunchScreen.xib */,
BA6E6D3D1A529CAD0005985D /* Supporting Files */,
);
path = DragDrop;
sourceTree = "<group>";
};
BA6E6D3D1A529CAD0005985D /* Supporting Files */ = {
isa = PBXGroup;
children = (
BA6E6D3E1A529CAD0005985D /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
BA6E6D521A529CB10005985D /* DragDropTests */ = {
isa = PBXGroup;
children = (
BA6E6D551A529CB20005985D /* DragDropTests.swift */,
BA6E6D531A529CB10005985D /* Supporting Files */,
);
path = DragDropTests;
sourceTree = "<group>";
};
BA6E6D531A529CB10005985D /* Supporting Files */ = {
isa = PBXGroup;
children = (
BA6E6D541A529CB10005985D /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
BA6E6D391A529CAD0005985D /* DragDrop */ = {
isa = PBXNativeTarget;
buildConfigurationList = BA6E6D591A529CB20005985D /* Build configuration list for PBXNativeTarget "DragDrop" */;
buildPhases = (
BA6E6D361A529CAD0005985D /* Sources */,
BA6E6D371A529CAD0005985D /* Frameworks */,
BA6E6D381A529CAD0005985D /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = DragDrop;
productName = DragDrop;
productReference = BA6E6D3A1A529CAD0005985D /* DragDrop.app */;
productType = "com.apple.product-type.application";
};
BA6E6D4E1A529CB10005985D /* DragDropTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = BA6E6D5C1A529CB20005985D /* Build configuration list for PBXNativeTarget "DragDropTests" */;
buildPhases = (
BA6E6D4B1A529CB10005985D /* Sources */,
BA6E6D4C1A529CB10005985D /* Frameworks */,
BA6E6D4D1A529CB10005985D /* Resources */,
);
buildRules = (
);
dependencies = (
BA6E6D511A529CB10005985D /* PBXTargetDependency */,
);
name = DragDropTests;
productName = DragDropTests;
productReference = BA6E6D4F1A529CB10005985D /* DragDropTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
BA6E6D321A529CAC0005985D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = LiorN;
TargetAttributes = {
BA6E6D391A529CAD0005985D = {
CreatedOnToolsVersion = 6.1.1;
DevelopmentTeam = AS8F5Z84GP;
};
BA6E6D4E1A529CB10005985D = {
CreatedOnToolsVersion = 6.1.1;
TestTargetID = BA6E6D391A529CAD0005985D;
};
};
};
buildConfigurationList = BA6E6D351A529CAC0005985D /* Build configuration list for PBXProject "DragDrop" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
mainGroup = BA6E6D311A529CAC0005985D;
productRefGroup = BA6E6D3B1A529CAD0005985D /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
BA6E6D391A529CAD0005985D /* DragDrop */,
BA6E6D4E1A529CB10005985D /* DragDropTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
BA6E6D381A529CAD0005985D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BA6E6D451A529CAF0005985D /* Main.storyboard in Resources */,
BA6E6D4A1A529CB00005985D /* LaunchScreen.xib in Resources */,
BA6E6D471A529CB00005985D /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
BA6E6D4D1A529CB10005985D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
BA6E6D361A529CAD0005985D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BA6E6D421A529CAF0005985D /* ViewController.swift in Sources */,
BA18A7C21A649C8D0044B197 /* DragDropCollectionView.swift in Sources */,
BA6E6D401A529CAE0005985D /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
BA6E6D4B1A529CB10005985D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BA6E6D561A529CB20005985D /* DragDropTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
BA6E6D511A529CB10005985D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = BA6E6D391A529CAD0005985D /* DragDrop */;
targetProxy = BA6E6D501A529CB10005985D /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
BA6E6D431A529CAF0005985D /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
BA6E6D441A529CAF0005985D /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
BA6E6D481A529CB00005985D /* LaunchScreen.xib */ = {
isa = PBXVariantGroup;
children = (
BA6E6D491A529CB00005985D /* Base */,
);
name = LaunchScreen.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
BA6E6D571A529CB20005985D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
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_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
BA6E6D581A529CB20005985D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
BA6E6D5A1A529CB20005985D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
INFOPLIST_FILE = DragDrop/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "LiorN.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
BA6E6D5B1A529CB20005985D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
INFOPLIST_FILE = DragDrop/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "LiorN.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_VERSION = 5.0;
};
name = Release;
};
BA6E6D5D1A529CB20005985D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = DragDropTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "LiorN.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DragDrop.app/DragDrop";
};
name = Debug;
};
BA6E6D5E1A529CB20005985D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
INFOPLIST_FILE = DragDropTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "LiorN.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DragDrop.app/DragDrop";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
BA6E6D351A529CAC0005985D /* Build configuration list for PBXProject "DragDrop" */ = {
isa = XCConfigurationList;
buildConfigurations = (
BA6E6D571A529CB20005985D /* Debug */,
BA6E6D581A529CB20005985D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
BA6E6D591A529CB20005985D /* Build configuration list for PBXNativeTarget "DragDrop" */ = {
isa = XCConfigurationList;
buildConfigurations = (
BA6E6D5A1A529CB20005985D /* Debug */,
BA6E6D5B1A529CB20005985D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
BA6E6D5C1A529CB20005985D /* Build configuration list for PBXNativeTarget "DragDropTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
BA6E6D5D1A529CB20005985D /* Debug */,
BA6E6D5E1A529CB20005985D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = BA6E6D321A529CAC0005985D /* Project object */;
}
================================================
FILE: Sample Project/DragDrop.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:DragDrop.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: Sample Project/DragDrop.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
================================================
FILE: Sample Project/DragDrop.xcodeproj/xcuserdata/Lior.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>
================================================
FILE: Sample Project/DragDrop.xcodeproj/xcuserdata/Lior.xcuserdatad/xcschemes/DragDrop.xcscheme
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0610"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BA6E6D391A529CAD0005985D"
BuildableName = "DragDrop.app"
BlueprintName = "DragDrop"
ReferencedContainer = "container:DragDrop.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BA6E6D4E1A529CB10005985D"
BuildableName = "DragDropTests.xctest"
BlueprintName = "DragDropTests"
ReferencedContainer = "container:DragDrop.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BA6E6D4E1A529CB10005985D"
BuildableName = "DragDropTests.xctest"
BlueprintName = "DragDropTests"
ReferencedContainer = "container:DragDrop.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BA6E6D391A529CAD0005985D"
BuildableName = "DragDrop.app"
BlueprintName = "DragDrop"
ReferencedContainer = "container:DragDrop.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BA6E6D391A529CAD0005985D"
BuildableName = "DragDrop.app"
BlueprintName = "DragDrop"
ReferencedContainer = "container:DragDrop.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BA6E6D391A529CAD0005985D"
BuildableName = "DragDrop.app"
BlueprintName = "DragDrop"
ReferencedContainer = "container:DragDrop.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
================================================
FILE: Sample Project/DragDrop.xcodeproj/xcuserdata/Lior.xcuserdatad/xcschemes/xcschememanagement.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>SchemeUserState</key>
<dict>
<key>DragDrop.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>BA6E6D391A529CAD0005985D</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>BA6E6D4E1A529CB10005985D</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
================================================
FILE: Sample Project/DragDrop.xcodeproj/xcuserdata/prog.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DragDrop/ViewController.swift"
timestampString = "583341563.2481591"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "50"
endingLineNumber = "50"
landmarkName = "toggleWiggle(sender:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../DragDropCollectionView.swift"
timestampString = "583341563.24827"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "261"
endingLineNumber = "261"
landmarkName = "startWiggle()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../DragDropCollectionView.swift"
timestampString = "583341563.248636"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "260"
endingLineNumber = "260"
landmarkName = "startWiggle()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../DragDropCollectionView.swift"
timestampString = "583341601.101064"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "288"
endingLineNumber = "288"
landmarkName = "addWiggleAnimationTo(_:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../DragDropCollectionView.swift"
timestampString = "583341604.534974"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "294"
endingLineNumber = "294"
landmarkName = "DragDropCollectionView"
landmarkType = "21">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../DragDropCollectionView.swift"
timestampString = "583341618.892578"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "304"
endingLineNumber = "304"
landmarkName = "rotationAnimation()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../DragDropCollectionView.swift"
timestampString = "583341632.940244"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "320"
endingLineNumber = "320"
landmarkName = "bounceAnimation()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../DragDropCollectionView.swift"
timestampString = "583341654.933239"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "317"
endingLineNumber = "317"
landmarkName = "bounceAnimation()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../DragDropCollectionView.swift"
timestampString = "583341669.8322231"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "290"
endingLineNumber = "290"
landmarkName = "addWiggleAnimationTo(_:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../DragDropCollectionView.swift"
timestampString = "583341678.388865"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "293"
endingLineNumber = "293"
landmarkName = "addWiggleAnimationTo(_:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../DragDropCollectionView.swift"
timestampString = "583341679.209855"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "292"
endingLineNumber = "292"
landmarkName = "addWiggleAnimationTo(_:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DragDrop/ViewController.swift"
timestampString = "583341689.155044"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "52"
endingLineNumber = "52"
landmarkName = "toggleWiggle(sender:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
================================================
FILE: Sample Project/DragDrop.xcodeproj/xcuserdata/prog.xcuserdatad/xcschemes/xcschememanagement.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>SchemeUserState</key>
<dict>
<key>DragDrop.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
================================================
FILE: Sample Project/DragDropTests/DragDropTests.swift
================================================
//
// DragDropTests.swift
// DragDropTests
//
// Created by Lior Neu-ner on 2014/12/30.
// Copyright (c) 2014 LiorN. All rights reserved.
//
import UIKit
import XCTest
class DragDropTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// This is an example of a functional test case.
XCTAssert(true, "Pass")
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measureBlock() {
// Put the code you want to measure the time of here.
}
}
}
================================================
FILE: Sample Project/DragDropTests/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>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
gitextract_dhodvlri/
├── DragDropCollectionView.swift
├── README.md
└── Sample Project/
├── DragDrop/
│ ├── AppDelegate.swift
│ ├── Base.lproj/
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets/
│ │ └── AppIcon.appiconset/
│ │ └── Contents.json
│ ├── Info.plist
│ └── ViewController.swift
├── DragDrop.xcodeproj/
│ ├── project.pbxproj
│ ├── project.xcworkspace/
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata/
│ │ ├── Lior.xcuserdatad/
│ │ │ └── UserInterfaceState.xcuserstate
│ │ └── prog.xcuserdatad/
│ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata/
│ ├── Lior.xcuserdatad/
│ │ ├── xcdebugger/
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes/
│ │ ├── DragDrop.xcscheme
│ │ └── xcschememanagement.plist
│ └── prog.xcuserdatad/
│ ├── xcdebugger/
│ │ └── Breakpoints_v2.xcbkptlist
│ └── xcschemes/
│ └── xcschememanagement.plist
└── DragDropTests/
├── DragDropTests.swift
└── Info.plist
Condensed preview — 20 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (75K chars).
[
{
"path": "DragDropCollectionView.swift",
"chars": 15829,
"preview": "//\n// DragDropCollectionView.swift\n// DragDrop\n//\n// Created by Lior Neu-ner on 2014/12/30.\n// Copyright (c) 2014 Li"
},
{
"path": "README.md",
"chars": 1741,
"preview": "# DragDropCollectionView\nA UICollectionView which allows for easy drag and drop to reorder cells. Mimicks the drag and d"
},
{
"path": "Sample Project/DragDrop/AppDelegate.swift",
"chars": 2152,
"preview": "//\n// AppDelegate.swift\n// DragDrop\n//\n// Created by Lior Neu-ner on 2014/12/30.\n// Copyright (c) 2014 LiorN. All ri"
},
{
"path": "Sample Project/DragDrop/Base.lproj/LaunchScreen.xib",
"chars": 3698,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "Sample Project/DragDrop/Base.lproj/Main.storyboard",
"chars": 7244,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3"
},
{
"path": "Sample Project/DragDrop/Images.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": "Sample Project/DragDrop/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": "Sample Project/DragDrop/ViewController.swift",
"chars": 2020,
"preview": "//\n// ViewController.swift\n// DragDrop\n//\n// Created by Lior Neu-ner on 2014/12/30.\n// Copyright (c) 2014 LiorN. All"
},
{
"path": "Sample Project/DragDrop.xcodeproj/project.pbxproj",
"chars": 17709,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "Sample Project/DragDrop.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 153,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:DragDrop.xcodep"
},
{
"path": "Sample Project/DragDrop.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
"chars": 238,
"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": "Sample Project/DragDrop.xcodeproj/xcuserdata/Lior.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist",
"chars": 91,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Bucket\n type = \"1\"\n version = \"2.0\">\n</Bucket>\n"
},
{
"path": "Sample Project/DragDrop.xcodeproj/xcuserdata/Lior.xcuserdatad/xcschemes/DragDrop.xcscheme",
"chars": 4168,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"0610\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "Sample Project/DragDrop.xcodeproj/xcuserdata/Lior.xcuserdatad/xcschemes/xcschememanagement.plist",
"chars": 570,
"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": "Sample Project/DragDrop.xcodeproj/xcuserdata/prog.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist",
"chars": 8074,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Bucket\n type = \"1\"\n version = \"2.0\">\n <Breakpoints>\n <BreakpointProxy"
},
{
"path": "Sample Project/DragDrop.xcodeproj/xcuserdata/prog.xcuserdatad/xcschemes/xcschememanagement.plist",
"chars": 343,
"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": "Sample Project/DragDropTests/DragDropTests.swift",
"chars": 901,
"preview": "//\n// DragDropTests.swift\n// DragDropTests\n//\n// Created by Lior Neu-ner on 2014/12/30.\n// Copyright (c) 2014 LiorN."
},
{
"path": "Sample Project/DragDropTests/Info.plist",
"chars": 733,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
}
]
// ... and 2 more files (download for full content)
About this extraction
This page contains the full source code of the LiorNn/DragDropCollectionView GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 20 files (66.6 KB), approximately 18.5k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.