├── ReferenceImages ├── starting_9_initial_view.png ├── starting_3_new_project_options.png ├── starting_4_new_project_template.png ├── starting_8_collection_view_object.png └── starting_run_empty_collectionView.png ├── MultiDirectionCollectionView.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata ├── xcuserdata │ └── kyleandrews.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── project.pbxproj ├── .gitignore ├── MultiDirectionCollectionView ├── CustomCollectionViewCell.swift ├── CustomCollectionViewController.swift ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── AppDelegate.swift ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard └── CustomCollectionViewLayout.swift ├── MultiDirectionCollectionViewTests ├── Info.plist └── MultiDirectionCollectionViewTests.swift ├── LICENSE └── README.md /ReferenceImages/starting_9_initial_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwandrews7/MultiDirectionCollectionView/HEAD/ReferenceImages/starting_9_initial_view.png -------------------------------------------------------------------------------- /ReferenceImages/starting_3_new_project_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwandrews7/MultiDirectionCollectionView/HEAD/ReferenceImages/starting_3_new_project_options.png -------------------------------------------------------------------------------- /ReferenceImages/starting_4_new_project_template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwandrews7/MultiDirectionCollectionView/HEAD/ReferenceImages/starting_4_new_project_template.png -------------------------------------------------------------------------------- /ReferenceImages/starting_8_collection_view_object.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwandrews7/MultiDirectionCollectionView/HEAD/ReferenceImages/starting_8_collection_view_object.png -------------------------------------------------------------------------------- /ReferenceImages/starting_run_empty_collectionView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwandrews7/MultiDirectionCollectionView/HEAD/ReferenceImages/starting_run_empty_collectionView.png -------------------------------------------------------------------------------- /MultiDirectionCollectionView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # Ignore unnecessary auto-generated files from Xcode 3 | 4 | build/ 5 | *.pbxuser 6 | !default.pbxuser 7 | *.mode1v3 8 | !default.mode1v3 9 | *.mode2v3 10 | !default.mode2v3 11 | *.perspectivev3 12 | !default.perspectivev3 13 | xcuserdata 14 | *.xccheckout 15 | *.moved-aside 16 | DerivedData 17 | *.hmap 18 | *.ipa 19 | *.xcuserstate 20 | 21 | -------------------------------------------------------------------------------- /MultiDirectionCollectionView/CustomCollectionViewCell.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | @IBDesignable 4 | class CustomCollectionViewCell: UICollectionViewCell { 5 | 6 | @IBOutlet weak var label: UILabel! 7 | 8 | required init?(coder aDecoder: NSCoder) { 9 | super.init(coder: aDecoder) 10 | setup() 11 | } 12 | 13 | override init(frame: CGRect) { 14 | super.init(frame: frame) 15 | setup() 16 | } 17 | 18 | func setup() { 19 | self.layer.borderWidth = 1.0 20 | self.layer.borderColor = UIColor.black.cgColor 21 | self.layer.cornerRadius = 5.0 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /MultiDirectionCollectionView.xcodeproj/xcuserdata/kyleandrews.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | MultiDirectionCollectionView.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | FB5D95351ABE5E6B00E7C8CD 16 | 17 | primary 18 | 19 | 20 | FB5D954A1ABE5E6B00E7C8CD 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /MultiDirectionCollectionViewTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Kyle Andrews 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /MultiDirectionCollectionViewTests/MultiDirectionCollectionViewTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MultiDirectionCollectionViewTests.swift 3 | // MultiDirectionCollectionViewTests 4 | // 5 | // Created by Kyle Andrews on 3/21/15. 6 | // Copyright (c) 2015 Credera. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | 12 | class MultiDirectionCollectionViewTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /MultiDirectionCollectionView/CustomCollectionViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | let reuseIdentifier = "customCell" 4 | 5 | class CustomCollectionViewController: UICollectionViewController { 6 | 7 | // MARK: UICollectionViewDataSource 8 | 9 | override func numberOfSections(in collectionView: UICollectionView) -> Int { 10 | //#warning Incomplete method implementation -- Return the number of sections 11 | return 50 12 | } 13 | 14 | 15 | override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { 16 | //#warning Incomplete method implementation -- Return the number of items in the section 17 | return 20 18 | } 19 | 20 | override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { 21 | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath) as! CustomCollectionViewCell 22 | 23 | // Configure the cell 24 | cell.label.text = "Sec " + indexPath.section.description + "/Item " + indexPath.item.description 25 | 26 | return cell 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /MultiDirectionCollectionView/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /MultiDirectionCollectionView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UIStatusBarHidden 34 | 35 | UIStatusBarStyle 36 | UIStatusBarStyleDefault 37 | UISupportedInterfaceOrientations 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationLandscapeLeft 41 | UIInterfaceOrientationLandscapeRight 42 | 43 | UISupportedInterfaceOrientations~ipad 44 | 45 | UIInterfaceOrientationPortrait 46 | UIInterfaceOrientationPortraitUpsideDown 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /MultiDirectionCollectionView/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // MultiDirectionCollectionView 4 | // 5 | // Created by Kyle Andrews on 3/21/15. 6 | // Copyright (c) 2015 Credera. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // 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. 24 | // 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. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // 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. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MultiDirectionCollectionView-Starter 2 | 3 | *Starter Project for Credera.com Blog @ https://www.credera.com/blog/mobile-applications-and-web/building-a-multi-directional-uicollectionview-in-swift/* 4 | 5 | ## What is this? 6 | 7 | This is a template project intended for use when following along with the *-TODO-BLOG_NAME-* on Credera.com at [Building a Multi-Directional UICollectionView in Swift](https://www.credera.com/blog/mobile-applications-and-web/building-a-multi-directional-uicollectionview-in-swift/). If you would prefer to create the project from scratch, step by step instructions for building the start project are provided below. 8 | 9 | ## Starting From Scratch 10 | 11 | 1. Open Xcode 12 | 2. Select File → New → Project 13 | 3. Select Single View Application under iOS → Application 14 | ![Step 3, Starting From Scratch](https://raw.githubusercontent.com/kwandrews7/MultiDirectionCollectionView/master/ReferenceImages/starting_3_new_project_options.png) 15 | 4. Fill out the fields as shown below. Note, the Product Name and Bundle Identifier do not have to match ours. 16 | ![Step 4, Starting From Scratch](https://raw.githubusercontent.com/kwandrews7/MultiDirectionCollectionView/master/ReferenceImages/starting_4_new_project_template.png) 17 | 5. Select a location to save your project 18 | 6. Delete ViewController.swift *(It won't be used)* 19 | 7. Open Main.storyboard and delete all items in the storyboard to start with a clean slate 20 | 8. Drag a `Collection View Controller` from Object Library in the bottom right corner 21 | ![Step 8, Starting From Scratch](https://raw.githubusercontent.com/kwandrews7/MultiDirectionCollectionView/master/ReferenceImages/starting_8_collection_view_object.png) 22 | 9. Select the CollectionViewController you just placed on the storyboard and check the "Is Initial View Controller checkbox inside the Attributes Inspector tab. 23 | ![Step 9, Starting From Scratch](https://raw.githubusercontent.com/kwandrews7/MultiDirectionCollectionView/master/ReferenceImages/starting_9_initial_view.png) 24 | 10. Run the project! 25 | 26 | At this point, you should simply see a black screen similar to the screenshot below. This a what a default Collection View Controller looks like without any data source or delegates configured. An empty black screen, fascinating, eh? Pick up where you left off over at [*-TODO-BLOG_LINK-*](*-TODO-BLOG_LINK-*). 27 | 28 | ![Sample Output, Starting From Scratch](https://raw.githubusercontent.com/kwandrews7/MultiDirectionCollectionView/master/ReferenceImages/starting_run_empty_collectionView.png) 29 | -------------------------------------------------------------------------------- /MultiDirectionCollectionView/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /MultiDirectionCollectionView/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /MultiDirectionCollectionView/CustomCollectionViewLayout.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | class CustomCollectionViewLayout: UICollectionViewLayout { 4 | 5 | // Used for calculating each cells CGRect on screen. 6 | // CGRect will define the Origin and Size of the cell. 7 | let CELL_HEIGHT = 30.0 8 | let CELL_WIDTH = 100.0 9 | let STATUS_BAR = UIApplication.shared.statusBarFrame.height 10 | 11 | // Dictionary to hold the UICollectionViewLayoutAttributes for 12 | // each cell. The layout attribtues will define the cell's size 13 | // and position (x, y, and z index). I have found this process 14 | // to be one of the heavier parts of the layout. I recommend 15 | // holding onto this data after it has been calculated in either 16 | // a dictionary or data store of some kind for a smooth performance. 17 | var cellAttrsDictionary = Dictionary() 18 | 19 | // Defines the size of the area the user can move around in 20 | // within the collection view. 21 | var contentSize = CGSize.zero 22 | 23 | // Used to determine if a data source update has occured. 24 | // Note: The data source would be responsible for updating 25 | // this value if an update was performed. 26 | var dataSourceDidUpdate = true 27 | 28 | override var collectionViewContentSize : CGSize { 29 | return self.contentSize 30 | } 31 | 32 | override func prepare() { 33 | 34 | // Only update header cells. 35 | if !dataSourceDidUpdate { 36 | 37 | // Determine current content offsets. 38 | let xOffset = collectionView!.contentOffset.x 39 | let yOffset = collectionView!.contentOffset.y 40 | 41 | if let sectionCount = collectionView?.numberOfSections, sectionCount > 0 { 42 | for section in 0...sectionCount-1 { 43 | 44 | // Confirm the section has items. 45 | if let rowCount = collectionView?.numberOfItems(inSection: section), rowCount > 0 { 46 | 47 | // Update all items in the first row. 48 | if section == 0 { 49 | for item in 0...rowCount-1 { 50 | 51 | // Build indexPath to get attributes from dictionary. 52 | let indexPath = IndexPath(item: item, section: section) 53 | 54 | // Update y-position to follow user. 55 | if let attrs = cellAttrsDictionary[indexPath] { 56 | var frame = attrs.frame 57 | 58 | // Also update x-position for corner cell. 59 | if item == 0 { 60 | frame.origin.x = xOffset 61 | } 62 | 63 | frame.origin.y = yOffset 64 | attrs.frame = frame 65 | } 66 | 67 | } 68 | 69 | // For all other sections, we only need to update 70 | // the x-position for the fist item. 71 | } else { 72 | 73 | // Build indexPath to get attributes from dictionary. 74 | let indexPath = IndexPath(item: 0, section: section) 75 | 76 | // Update y-position to follow user. 77 | if let attrs = cellAttrsDictionary[indexPath] { 78 | var frame = attrs.frame 79 | frame.origin.x = xOffset 80 | attrs.frame = frame 81 | } 82 | 83 | } // else 84 | } // num of items in section > 0 85 | } // sections for loop 86 | } // num of sections > 0 87 | 88 | 89 | // Do not run attribute generation code 90 | // unless data source has been updated. 91 | return 92 | } 93 | 94 | // Acknowledge data source change, and disable for next time. 95 | dataSourceDidUpdate = false 96 | 97 | // Cycle through each section of the data source. 98 | if let sectionCount = collectionView?.numberOfSections, sectionCount > 0 { 99 | for section in 0...sectionCount-1 { 100 | 101 | // Cycle through each item in the section. 102 | if let rowCount = collectionView?.numberOfItems(inSection: section), rowCount > 0 { 103 | for item in 0...rowCount-1 { 104 | 105 | // Build the UICollectionVieLayoutAttributes for the cell. 106 | let cellIndex = IndexPath(item: item, section: section) 107 | let xPos = Double(item) * CELL_WIDTH 108 | let yPos = Double(section) * CELL_HEIGHT 109 | 110 | let cellAttributes = UICollectionViewLayoutAttributes(forCellWith: cellIndex) 111 | cellAttributes.frame = CGRect(x: xPos, y: yPos, width: CELL_WIDTH, height: CELL_HEIGHT) 112 | 113 | // Determine zIndex based on cell type. 114 | if section == 0 && item == 0 { 115 | cellAttributes.zIndex = 4 116 | } else if section == 0 { 117 | cellAttributes.zIndex = 3 118 | } else if item == 0 { 119 | cellAttributes.zIndex = 2 120 | } else { 121 | cellAttributes.zIndex = 1 122 | } 123 | 124 | // Save the attributes. 125 | cellAttrsDictionary[cellIndex] = cellAttributes 126 | 127 | } 128 | } 129 | 130 | } 131 | } 132 | 133 | // Update content size. 134 | let contentWidth = Double(collectionView!.numberOfItems(inSection: 0)) * CELL_WIDTH 135 | let contentHeight = Double(collectionView!.numberOfSections) * CELL_HEIGHT 136 | self.contentSize = CGSize(width: contentWidth, height: contentHeight) 137 | 138 | } 139 | 140 | override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? { 141 | 142 | // Create an array to hold all elements found in our current view. 143 | var attributesInRect = [UICollectionViewLayoutAttributes]() 144 | 145 | // Check each element to see if it should be returned. 146 | for cellAttributes in cellAttrsDictionary.values { 147 | if rect.intersects(cellAttributes.frame) { 148 | attributesInRect.append(cellAttributes) 149 | } 150 | } 151 | 152 | // Return list of elements. 153 | return attributesInRect 154 | } 155 | 156 | override func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? { 157 | return cellAttrsDictionary[indexPath]! 158 | } 159 | 160 | override func shouldInvalidateLayout(forBoundsChange newBounds: CGRect) -> Bool { 161 | return true 162 | } 163 | 164 | } 165 | -------------------------------------------------------------------------------- /MultiDirectionCollectionView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | FB0826A31ABF65D3001FB3DB /* CustomCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB0826A21ABF65D3001FB3DB /* CustomCollectionViewCell.swift */; }; 11 | FB5D953C1ABE5E6B00E7C8CD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB5D953B1ABE5E6B00E7C8CD /* AppDelegate.swift */; }; 12 | FB5D95411ABE5E6B00E7C8CD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FB5D953F1ABE5E6B00E7C8CD /* Main.storyboard */; }; 13 | FB5D95431ABE5E6B00E7C8CD /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FB5D95421ABE5E6B00E7C8CD /* Images.xcassets */; }; 14 | FB5D95461ABE5E6B00E7C8CD /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = FB5D95441ABE5E6B00E7C8CD /* LaunchScreen.xib */; }; 15 | FB5D95521ABE5E6B00E7C8CD /* MultiDirectionCollectionViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB5D95511ABE5E6B00E7C8CD /* MultiDirectionCollectionViewTests.swift */; }; 16 | FB6CDB401AE5F513009834B6 /* CustomCollectionViewLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB6CDB3F1AE5F513009834B6 /* CustomCollectionViewLayout.swift */; }; 17 | FBD0C7FA1ABE6DBA00C056C8 /* CustomCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBD0C7F91ABE6DBA00C056C8 /* CustomCollectionViewController.swift */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | FB5D954C1ABE5E6B00E7C8CD /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = FB5D952E1ABE5E6B00E7C8CD /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = FB5D95351ABE5E6B00E7C8CD; 26 | remoteInfo = MultiDirectionCollectionView; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | FB0826A21ABF65D3001FB3DB /* CustomCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomCollectionViewCell.swift; sourceTree = ""; }; 32 | FB5D95361ABE5E6B00E7C8CD /* MultiDirectionCollectionView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MultiDirectionCollectionView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | FB5D953A1ABE5E6B00E7C8CD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 34 | FB5D953B1ABE5E6B00E7C8CD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 35 | FB5D95401ABE5E6B00E7C8CD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 36 | FB5D95421ABE5E6B00E7C8CD /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 37 | FB5D95451ABE5E6B00E7C8CD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 38 | FB5D954B1ABE5E6B00E7C8CD /* MultiDirectionCollectionViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MultiDirectionCollectionViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | FB5D95501ABE5E6B00E7C8CD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 40 | FB5D95511ABE5E6B00E7C8CD /* MultiDirectionCollectionViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MultiDirectionCollectionViewTests.swift; sourceTree = ""; }; 41 | FB6CDB3F1AE5F513009834B6 /* CustomCollectionViewLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomCollectionViewLayout.swift; sourceTree = ""; }; 42 | FBD0C7F91ABE6DBA00C056C8 /* CustomCollectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomCollectionViewController.swift; sourceTree = ""; }; 43 | /* End PBXFileReference section */ 44 | 45 | /* Begin PBXFrameworksBuildPhase section */ 46 | FB5D95331ABE5E6B00E7C8CD /* Frameworks */ = { 47 | isa = PBXFrameworksBuildPhase; 48 | buildActionMask = 2147483647; 49 | files = ( 50 | ); 51 | runOnlyForDeploymentPostprocessing = 0; 52 | }; 53 | FB5D95481ABE5E6B00E7C8CD /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | ); 58 | runOnlyForDeploymentPostprocessing = 0; 59 | }; 60 | /* End PBXFrameworksBuildPhase section */ 61 | 62 | /* Begin PBXGroup section */ 63 | FB5D952D1ABE5E6B00E7C8CD = { 64 | isa = PBXGroup; 65 | children = ( 66 | FB5D95381ABE5E6B00E7C8CD /* MultiDirectionCollectionView */, 67 | FB5D954E1ABE5E6B00E7C8CD /* MultiDirectionCollectionViewTests */, 68 | FB5D95371ABE5E6B00E7C8CD /* Products */, 69 | ); 70 | sourceTree = ""; 71 | }; 72 | FB5D95371ABE5E6B00E7C8CD /* Products */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | FB5D95361ABE5E6B00E7C8CD /* MultiDirectionCollectionView.app */, 76 | FB5D954B1ABE5E6B00E7C8CD /* MultiDirectionCollectionViewTests.xctest */, 77 | ); 78 | name = Products; 79 | sourceTree = ""; 80 | }; 81 | FB5D95381ABE5E6B00E7C8CD /* MultiDirectionCollectionView */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | FB5D953B1ABE5E6B00E7C8CD /* AppDelegate.swift */, 85 | FBD0C7F91ABE6DBA00C056C8 /* CustomCollectionViewController.swift */, 86 | FB0826A21ABF65D3001FB3DB /* CustomCollectionViewCell.swift */, 87 | FB6CDB3F1AE5F513009834B6 /* CustomCollectionViewLayout.swift */, 88 | FB5D953F1ABE5E6B00E7C8CD /* Main.storyboard */, 89 | FB5D95421ABE5E6B00E7C8CD /* Images.xcassets */, 90 | FB5D95441ABE5E6B00E7C8CD /* LaunchScreen.xib */, 91 | FB5D95391ABE5E6B00E7C8CD /* Supporting Files */, 92 | ); 93 | path = MultiDirectionCollectionView; 94 | sourceTree = ""; 95 | }; 96 | FB5D95391ABE5E6B00E7C8CD /* Supporting Files */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | FB5D953A1ABE5E6B00E7C8CD /* Info.plist */, 100 | ); 101 | name = "Supporting Files"; 102 | sourceTree = ""; 103 | }; 104 | FB5D954E1ABE5E6B00E7C8CD /* MultiDirectionCollectionViewTests */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | FB5D95511ABE5E6B00E7C8CD /* MultiDirectionCollectionViewTests.swift */, 108 | FB5D954F1ABE5E6B00E7C8CD /* Supporting Files */, 109 | ); 110 | path = MultiDirectionCollectionViewTests; 111 | sourceTree = ""; 112 | }; 113 | FB5D954F1ABE5E6B00E7C8CD /* Supporting Files */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | FB5D95501ABE5E6B00E7C8CD /* Info.plist */, 117 | ); 118 | name = "Supporting Files"; 119 | sourceTree = ""; 120 | }; 121 | /* End PBXGroup section */ 122 | 123 | /* Begin PBXNativeTarget section */ 124 | FB5D95351ABE5E6B00E7C8CD /* MultiDirectionCollectionView */ = { 125 | isa = PBXNativeTarget; 126 | buildConfigurationList = FB5D95551ABE5E6B00E7C8CD /* Build configuration list for PBXNativeTarget "MultiDirectionCollectionView" */; 127 | buildPhases = ( 128 | FB5D95321ABE5E6B00E7C8CD /* Sources */, 129 | FB5D95331ABE5E6B00E7C8CD /* Frameworks */, 130 | FB5D95341ABE5E6B00E7C8CD /* Resources */, 131 | ); 132 | buildRules = ( 133 | ); 134 | dependencies = ( 135 | ); 136 | name = MultiDirectionCollectionView; 137 | productName = MultiDirectionCollectionView; 138 | productReference = FB5D95361ABE5E6B00E7C8CD /* MultiDirectionCollectionView.app */; 139 | productType = "com.apple.product-type.application"; 140 | }; 141 | FB5D954A1ABE5E6B00E7C8CD /* MultiDirectionCollectionViewTests */ = { 142 | isa = PBXNativeTarget; 143 | buildConfigurationList = FB5D95581ABE5E6B00E7C8CD /* Build configuration list for PBXNativeTarget "MultiDirectionCollectionViewTests" */; 144 | buildPhases = ( 145 | FB5D95471ABE5E6B00E7C8CD /* Sources */, 146 | FB5D95481ABE5E6B00E7C8CD /* Frameworks */, 147 | FB5D95491ABE5E6B00E7C8CD /* Resources */, 148 | ); 149 | buildRules = ( 150 | ); 151 | dependencies = ( 152 | FB5D954D1ABE5E6B00E7C8CD /* PBXTargetDependency */, 153 | ); 154 | name = MultiDirectionCollectionViewTests; 155 | productName = MultiDirectionCollectionViewTests; 156 | productReference = FB5D954B1ABE5E6B00E7C8CD /* MultiDirectionCollectionViewTests.xctest */; 157 | productType = "com.apple.product-type.bundle.unit-test"; 158 | }; 159 | /* End PBXNativeTarget section */ 160 | 161 | /* Begin PBXProject section */ 162 | FB5D952E1ABE5E6B00E7C8CD /* Project object */ = { 163 | isa = PBXProject; 164 | attributes = { 165 | LastSwiftMigration = 0720; 166 | LastSwiftUpdateCheck = 0720; 167 | LastUpgradeCheck = 0830; 168 | ORGANIZATIONNAME = Credera; 169 | TargetAttributes = { 170 | FB5D95351ABE5E6B00E7C8CD = { 171 | CreatedOnToolsVersion = 6.2; 172 | LastSwiftMigration = 0810; 173 | }; 174 | FB5D954A1ABE5E6B00E7C8CD = { 175 | CreatedOnToolsVersion = 6.2; 176 | LastSwiftMigration = 0810; 177 | TestTargetID = FB5D95351ABE5E6B00E7C8CD; 178 | }; 179 | }; 180 | }; 181 | buildConfigurationList = FB5D95311ABE5E6B00E7C8CD /* Build configuration list for PBXProject "MultiDirectionCollectionView" */; 182 | compatibilityVersion = "Xcode 3.2"; 183 | developmentRegion = English; 184 | hasScannedForEncodings = 0; 185 | knownRegions = ( 186 | en, 187 | Base, 188 | ); 189 | mainGroup = FB5D952D1ABE5E6B00E7C8CD; 190 | productRefGroup = FB5D95371ABE5E6B00E7C8CD /* Products */; 191 | projectDirPath = ""; 192 | projectRoot = ""; 193 | targets = ( 194 | FB5D95351ABE5E6B00E7C8CD /* MultiDirectionCollectionView */, 195 | FB5D954A1ABE5E6B00E7C8CD /* MultiDirectionCollectionViewTests */, 196 | ); 197 | }; 198 | /* End PBXProject section */ 199 | 200 | /* Begin PBXResourcesBuildPhase section */ 201 | FB5D95341ABE5E6B00E7C8CD /* Resources */ = { 202 | isa = PBXResourcesBuildPhase; 203 | buildActionMask = 2147483647; 204 | files = ( 205 | FB5D95411ABE5E6B00E7C8CD /* Main.storyboard in Resources */, 206 | FB5D95461ABE5E6B00E7C8CD /* LaunchScreen.xib in Resources */, 207 | FB5D95431ABE5E6B00E7C8CD /* Images.xcassets in Resources */, 208 | ); 209 | runOnlyForDeploymentPostprocessing = 0; 210 | }; 211 | FB5D95491ABE5E6B00E7C8CD /* Resources */ = { 212 | isa = PBXResourcesBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | }; 218 | /* End PBXResourcesBuildPhase section */ 219 | 220 | /* Begin PBXSourcesBuildPhase section */ 221 | FB5D95321ABE5E6B00E7C8CD /* Sources */ = { 222 | isa = PBXSourcesBuildPhase; 223 | buildActionMask = 2147483647; 224 | files = ( 225 | FB5D953C1ABE5E6B00E7C8CD /* AppDelegate.swift in Sources */, 226 | FB0826A31ABF65D3001FB3DB /* CustomCollectionViewCell.swift in Sources */, 227 | FB6CDB401AE5F513009834B6 /* CustomCollectionViewLayout.swift in Sources */, 228 | FBD0C7FA1ABE6DBA00C056C8 /* CustomCollectionViewController.swift in Sources */, 229 | ); 230 | runOnlyForDeploymentPostprocessing = 0; 231 | }; 232 | FB5D95471ABE5E6B00E7C8CD /* Sources */ = { 233 | isa = PBXSourcesBuildPhase; 234 | buildActionMask = 2147483647; 235 | files = ( 236 | FB5D95521ABE5E6B00E7C8CD /* MultiDirectionCollectionViewTests.swift in Sources */, 237 | ); 238 | runOnlyForDeploymentPostprocessing = 0; 239 | }; 240 | /* End PBXSourcesBuildPhase section */ 241 | 242 | /* Begin PBXTargetDependency section */ 243 | FB5D954D1ABE5E6B00E7C8CD /* PBXTargetDependency */ = { 244 | isa = PBXTargetDependency; 245 | target = FB5D95351ABE5E6B00E7C8CD /* MultiDirectionCollectionView */; 246 | targetProxy = FB5D954C1ABE5E6B00E7C8CD /* PBXContainerItemProxy */; 247 | }; 248 | /* End PBXTargetDependency section */ 249 | 250 | /* Begin PBXVariantGroup section */ 251 | FB5D953F1ABE5E6B00E7C8CD /* Main.storyboard */ = { 252 | isa = PBXVariantGroup; 253 | children = ( 254 | FB5D95401ABE5E6B00E7C8CD /* Base */, 255 | ); 256 | name = Main.storyboard; 257 | sourceTree = ""; 258 | }; 259 | FB5D95441ABE5E6B00E7C8CD /* LaunchScreen.xib */ = { 260 | isa = PBXVariantGroup; 261 | children = ( 262 | FB5D95451ABE5E6B00E7C8CD /* Base */, 263 | ); 264 | name = LaunchScreen.xib; 265 | sourceTree = ""; 266 | }; 267 | /* End PBXVariantGroup section */ 268 | 269 | /* Begin XCBuildConfiguration section */ 270 | FB5D95531ABE5E6B00E7C8CD /* Debug */ = { 271 | isa = XCBuildConfiguration; 272 | buildSettings = { 273 | ALWAYS_SEARCH_USER_PATHS = NO; 274 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 275 | CLANG_CXX_LIBRARY = "libc++"; 276 | CLANG_ENABLE_MODULES = YES; 277 | CLANG_ENABLE_OBJC_ARC = YES; 278 | CLANG_WARN_BOOL_CONVERSION = YES; 279 | CLANG_WARN_CONSTANT_CONVERSION = YES; 280 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 281 | CLANG_WARN_EMPTY_BODY = YES; 282 | CLANG_WARN_ENUM_CONVERSION = YES; 283 | CLANG_WARN_INFINITE_RECURSION = YES; 284 | CLANG_WARN_INT_CONVERSION = YES; 285 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 286 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 287 | CLANG_WARN_UNREACHABLE_CODE = YES; 288 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 289 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 290 | COPY_PHASE_STRIP = NO; 291 | ENABLE_STRICT_OBJC_MSGSEND = YES; 292 | ENABLE_TESTABILITY = YES; 293 | GCC_C_LANGUAGE_STANDARD = gnu99; 294 | GCC_DYNAMIC_NO_PIC = NO; 295 | GCC_NO_COMMON_BLOCKS = YES; 296 | GCC_OPTIMIZATION_LEVEL = 0; 297 | GCC_PREPROCESSOR_DEFINITIONS = ( 298 | "DEBUG=1", 299 | "$(inherited)", 300 | ); 301 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 302 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 303 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 304 | GCC_WARN_UNDECLARED_SELECTOR = YES; 305 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 306 | GCC_WARN_UNUSED_FUNCTION = YES; 307 | GCC_WARN_UNUSED_VARIABLE = YES; 308 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 309 | MTL_ENABLE_DEBUG_INFO = YES; 310 | ONLY_ACTIVE_ARCH = YES; 311 | SDKROOT = iphoneos; 312 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 313 | TARGETED_DEVICE_FAMILY = "1,2"; 314 | }; 315 | name = Debug; 316 | }; 317 | FB5D95541ABE5E6B00E7C8CD /* Release */ = { 318 | isa = XCBuildConfiguration; 319 | buildSettings = { 320 | ALWAYS_SEARCH_USER_PATHS = NO; 321 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 322 | CLANG_CXX_LIBRARY = "libc++"; 323 | CLANG_ENABLE_MODULES = YES; 324 | CLANG_ENABLE_OBJC_ARC = YES; 325 | CLANG_WARN_BOOL_CONVERSION = YES; 326 | CLANG_WARN_CONSTANT_CONVERSION = YES; 327 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 328 | CLANG_WARN_EMPTY_BODY = YES; 329 | CLANG_WARN_ENUM_CONVERSION = YES; 330 | CLANG_WARN_INFINITE_RECURSION = YES; 331 | CLANG_WARN_INT_CONVERSION = YES; 332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 333 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 334 | CLANG_WARN_UNREACHABLE_CODE = YES; 335 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 336 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 337 | COPY_PHASE_STRIP = NO; 338 | ENABLE_NS_ASSERTIONS = NO; 339 | ENABLE_STRICT_OBJC_MSGSEND = YES; 340 | GCC_C_LANGUAGE_STANDARD = gnu99; 341 | GCC_NO_COMMON_BLOCKS = YES; 342 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 343 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 344 | GCC_WARN_UNDECLARED_SELECTOR = YES; 345 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 346 | GCC_WARN_UNUSED_FUNCTION = YES; 347 | GCC_WARN_UNUSED_VARIABLE = YES; 348 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 349 | MTL_ENABLE_DEBUG_INFO = NO; 350 | SDKROOT = iphoneos; 351 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 352 | TARGETED_DEVICE_FAMILY = "1,2"; 353 | VALIDATE_PRODUCT = YES; 354 | }; 355 | name = Release; 356 | }; 357 | FB5D95561ABE5E6B00E7C8CD /* Debug */ = { 358 | isa = XCBuildConfiguration; 359 | buildSettings = { 360 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 361 | INFOPLIST_FILE = MultiDirectionCollectionView/Info.plist; 362 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 363 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 364 | PRODUCT_BUNDLE_IDENTIFIER = "com.credera.blog.$(PRODUCT_NAME:rfc1034identifier)"; 365 | PRODUCT_NAME = "$(TARGET_NAME)"; 366 | SWIFT_VERSION = 3.0; 367 | TARGETED_DEVICE_FAMILY = "1,2"; 368 | }; 369 | name = Debug; 370 | }; 371 | FB5D95571ABE5E6B00E7C8CD /* Release */ = { 372 | isa = XCBuildConfiguration; 373 | buildSettings = { 374 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 375 | INFOPLIST_FILE = MultiDirectionCollectionView/Info.plist; 376 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 377 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 378 | PRODUCT_BUNDLE_IDENTIFIER = "com.credera.blog.$(PRODUCT_NAME:rfc1034identifier)"; 379 | PRODUCT_NAME = "$(TARGET_NAME)"; 380 | SWIFT_VERSION = 3.0; 381 | TARGETED_DEVICE_FAMILY = "1,2"; 382 | }; 383 | name = Release; 384 | }; 385 | FB5D95591ABE5E6B00E7C8CD /* Debug */ = { 386 | isa = XCBuildConfiguration; 387 | buildSettings = { 388 | BUNDLE_LOADER = "$(TEST_HOST)"; 389 | FRAMEWORK_SEARCH_PATHS = ( 390 | "$(SDKROOT)/Developer/Library/Frameworks", 391 | "$(inherited)", 392 | ); 393 | GCC_PREPROCESSOR_DEFINITIONS = ( 394 | "DEBUG=1", 395 | "$(inherited)", 396 | ); 397 | INFOPLIST_FILE = MultiDirectionCollectionViewTests/Info.plist; 398 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 399 | PRODUCT_BUNDLE_IDENTIFIER = "com.credera.blog.$(PRODUCT_NAME:rfc1034identifier)"; 400 | PRODUCT_NAME = "$(TARGET_NAME)"; 401 | SWIFT_VERSION = 3.0; 402 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MultiDirectionCollectionView.app/MultiDirectionCollectionView"; 403 | }; 404 | name = Debug; 405 | }; 406 | FB5D955A1ABE5E6B00E7C8CD /* Release */ = { 407 | isa = XCBuildConfiguration; 408 | buildSettings = { 409 | BUNDLE_LOADER = "$(TEST_HOST)"; 410 | FRAMEWORK_SEARCH_PATHS = ( 411 | "$(SDKROOT)/Developer/Library/Frameworks", 412 | "$(inherited)", 413 | ); 414 | INFOPLIST_FILE = MultiDirectionCollectionViewTests/Info.plist; 415 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 416 | PRODUCT_BUNDLE_IDENTIFIER = "com.credera.blog.$(PRODUCT_NAME:rfc1034identifier)"; 417 | PRODUCT_NAME = "$(TARGET_NAME)"; 418 | SWIFT_VERSION = 3.0; 419 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MultiDirectionCollectionView.app/MultiDirectionCollectionView"; 420 | }; 421 | name = Release; 422 | }; 423 | /* End XCBuildConfiguration section */ 424 | 425 | /* Begin XCConfigurationList section */ 426 | FB5D95311ABE5E6B00E7C8CD /* Build configuration list for PBXProject "MultiDirectionCollectionView" */ = { 427 | isa = XCConfigurationList; 428 | buildConfigurations = ( 429 | FB5D95531ABE5E6B00E7C8CD /* Debug */, 430 | FB5D95541ABE5E6B00E7C8CD /* Release */, 431 | ); 432 | defaultConfigurationIsVisible = 0; 433 | defaultConfigurationName = Release; 434 | }; 435 | FB5D95551ABE5E6B00E7C8CD /* Build configuration list for PBXNativeTarget "MultiDirectionCollectionView" */ = { 436 | isa = XCConfigurationList; 437 | buildConfigurations = ( 438 | FB5D95561ABE5E6B00E7C8CD /* Debug */, 439 | FB5D95571ABE5E6B00E7C8CD /* Release */, 440 | ); 441 | defaultConfigurationIsVisible = 0; 442 | defaultConfigurationName = Release; 443 | }; 444 | FB5D95581ABE5E6B00E7C8CD /* Build configuration list for PBXNativeTarget "MultiDirectionCollectionViewTests" */ = { 445 | isa = XCConfigurationList; 446 | buildConfigurations = ( 447 | FB5D95591ABE5E6B00E7C8CD /* Debug */, 448 | FB5D955A1ABE5E6B00E7C8CD /* Release */, 449 | ); 450 | defaultConfigurationIsVisible = 0; 451 | defaultConfigurationName = Release; 452 | }; 453 | /* End XCConfigurationList section */ 454 | }; 455 | rootObject = FB5D952E1ABE5E6B00E7C8CD /* Project object */; 456 | } 457 | --------------------------------------------------------------------------------