Commit f3c33ea2 authored by Zach Knox's avatar Zach Knox
Browse files

Building up collection view to the scale of the tableview

Still not showing any cells though鈥攂aby steps 馃懚
parent aa829199
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16C67" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="49O-ie-MPO">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="49O-ie-MPO">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
......@@ -18,11 +18,11 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="08A-44-UZN">
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="LAUNCHSCREEN" selectionStyle="default" indentationWidth="10" id="08A-44-UZN">
<rect key="frame" x="0.0" y="28" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="08A-44-UZN" id="TNc-Za-76x">
<rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
......
......@@ -132,10 +132,10 @@
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" restorationIdentifier="CollectionCell" id="6qn-VX-mZx" customClass="SRCTSimpleCollectionViewCell" customModule="WhatsOpen" customModuleProvider="target">
<rect key="frame" x="63" y="7" width="250" height="150"/>
<rect key="frame" x="62.5" y="7" width="250" height="150"/>
<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="250" height="150"/>
<rect key="frame" x="0.0" y="0.0" width="251" height="150"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Location" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6QR-8Q-n4s">
......
......@@ -35,13 +35,14 @@ class LocationsListViewController: UIViewController, UICollectionViewDelegate, U
LocationsList.dataSource = self
LocationsList.delegate = self
self.view.addSubview(LocationsList)
//Yes I could just run the code inside these in here
//I want to be both more modular and more organized
setupDataSourceForList(LocationsList)
setupDelegateForList(LocationsList)
SRCTNetworkController.performDownload { (facilities) in
self.facilitiesArray = facilities
// print(self.facilitiesArray)
DispatchQueue.main.async {
self.LocationsList.reloadData()
}
}
}
override func didReceiveMemoryWarning() {
......@@ -49,15 +50,6 @@ class LocationsListViewController: UIViewController, UICollectionViewDelegate, U
// Dispose of any resources that can be recreated.
}
func setupDataSourceForList(_ list: UICollectionView) {
var dataSource = list.dataSource
}
func setupDelegateForList(_ list: UICollectionView) {
var delegate = list.delegate
}
func numberOfSections(in collectionView: UICollectionView) -> Int {
return 2
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment