Merged branch BUG-Load-Collection-Views-Dynamically into master

This commit is contained in:
Okechi Onyeje 2016-11-19 19:09:58 -05:00
commit 6ba4044d86
8 changed files with 228 additions and 137 deletions

View File

@ -30,6 +30,7 @@
3E7CF4011CF6366300F486B2 /* EtsyRESTAPIManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E7CF4001CF6366300F486B2 /* EtsyRESTAPIManager.swift */; };
3EA668A11D02836C00EE57A8 /* EbayWebServiceManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EA668A01D02836C00EE57A8 /* EbayWebServiceManager.swift */; };
3EB2F5161CF442CF002E6D2C /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EB2F5151CF442CF002E6D2C /* Security.framework */; };
3EB54E0E1DE08A2E006D918B /* NetworkCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EB54E0D1DE08A2E006D918B /* NetworkCollectionViewCell.swift */; };
3EC325111CF703A600626C48 /* ItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EC325101CF703A600626C48 /* ItemCell.swift */; };
3EC325151CF7104300626C48 /* ItemTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EC325141CF7104300626C48 /* ItemTableViewController.swift */; };
3EC3251E1CF734C100626C48 /* NetworksTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EC3251D1CF734C100626C48 /* NetworksTableViewController.swift */; };
@ -99,6 +100,7 @@
3EA668A01D02836C00EE57A8 /* EbayWebServiceManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EbayWebServiceManager.swift; sourceTree = "<group>"; };
3EA668A21D02ECB100EE57A8 /* libicucore.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libicucore.tbd; path = usr/lib/libicucore.tbd; sourceTree = SDKROOT; };
3EB2F5151CF442CF002E6D2C /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
3EB54E0D1DE08A2E006D918B /* NetworkCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkCollectionViewCell.swift; sourceTree = "<group>"; };
3EC325101CF703A600626C48 /* ItemCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemCell.swift; sourceTree = "<group>"; };
3EC325141CF7104300626C48 /* ItemTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemTableViewController.swift; sourceTree = "<group>"; };
3EC3251D1CF734C100626C48 /* NetworksTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworksTableViewController.swift; sourceTree = "<group>"; };
@ -288,6 +290,7 @@
3EC325101CF703A600626C48 /* ItemCell.swift */,
3EC325141CF7104300626C48 /* ItemTableViewController.swift */,
3E0F76FB1D01B2D7004A0159 /* Listing.swift */,
3EB54E0D1DE08A2E006D918B /* NetworkCollectionViewCell.swift */,
);
name = Items;
sourceTree = "<group>";
@ -763,6 +766,7 @@
3E1AA4321D0DA071005FCCBB /* MenuPanelViewController.swift in Sources */,
3E4897D11D0067030069F742 /* FirebaseManager.swift in Sources */,
3E1AA4351D0DD173005FCCBB /* SettingsViewController.swift in Sources */,
3EB54E0E1DE08A2E006D918B /* NetworkCollectionViewCell.swift in Sources */,
3E0F76FC1D01B2D7004A0159 /* Listing.swift in Sources */,
3E6CC3571CF2A94B00E00A70 /* AppDelegate.swift in Sources */,
3EC3251E1CF734C100626C48 /* NetworksTableViewController.swift in Sources */,

View File

@ -10,11 +10,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Vendoo/ListingPreviewViewController.swift"
timestampString = "500766163.891715"
timestampString = "501292645.293697"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "611"
endingLineNumber = "611"
startingLineNumber = "617"
endingLineNumber = "617"
landmarkName = "publishItem(_:)"
landmarkType = "5">
</BreakpointContent>
@ -186,7 +186,7 @@
moduleName = "Vendoo"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/CategoriesTableViewController.swift"
timestampString = "500945316.10311"
timestampString = "501291173.047822"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "570"
@ -201,7 +201,7 @@
moduleName = "Vendoo"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/CategoriesTableViewController.swift"
timestampString = "500945316.10327"
timestampString = "501291173.047982"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "572"
@ -543,6 +543,53 @@
endingLineNumber = "625"
landmarkName = "getListingInfo(_:onCompletion:)"
landmarkType = "5">
<Locations>
<Location
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "Vendoo.EtsyRESTAPIManager.getListingInfo (Swift.String, onCompletion : Swift.Optional&lt;(Swift.Optional&lt;Swift.AnyObject&gt;, Swift.Optional&lt;__ObjC.NSError&gt;) -&gt; ()&gt;) -&gt; ()"
moduleName = "Vendoo"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/EtsyRESTAPIManager.swift"
timestampString = "501291173.058898"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "627"
endingLineNumber = "627"
offsetFromSymbolStart = "573">
</Location>
<Location
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "Vendoo.EtsyRESTAPIManager.(getListingInfo (Swift.String, onCompletion : Swift.Optional&lt;(Swift.Optional&lt;Swift.AnyObject&gt;, Swift.Optional&lt;__ObjC.NSError&gt;) -&gt; ()&gt;) -&gt; ()).(closure #1)"
moduleName = "Vendoo"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/EtsyRESTAPIManager.swift"
timestampString = "501291173.058998"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "627"
endingLineNumber = "627"
offsetFromSymbolStart = "2884">
</Location>
<Location
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "Vendoo.EtsyRESTAPIManager.(getListingInfo (Swift.String, onCompletion : Swift.Optional&lt;(Swift.Optional&lt;Swift.AnyObject&gt;, Swift.Optional&lt;__ObjC.NSError&gt;) -&gt; ()&gt;) -&gt; ()).(closure #2)"
moduleName = "Vendoo"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/EtsyRESTAPIManager.swift"
timestampString = "501291173.059085"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "629"
endingLineNumber = "629"
offsetFromSymbolStart = "19">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
@ -577,5 +624,85 @@
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Vendoo/ItemTableViewController.swift"
timestampString = "501291030.615232"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "185"
endingLineNumber = "185"
landmarkName = "tableView(_:cellForRowAtIndexPath:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Vendoo/ItemTableViewController.swift"
timestampString = "501291030.615232"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "193"
endingLineNumber = "193"
landmarkName = "tableView(_:cellForRowAtIndexPath:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Vendoo/ItemTableViewController.swift"
timestampString = "501291030.615232"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "198"
endingLineNumber = "198"
landmarkName = "tableView(_:cellForRowAtIndexPath:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Vendoo/ItemTableViewController.swift"
timestampString = "501291030.615232"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "219"
endingLineNumber = "219"
landmarkName = "tableView(_:cellForRowAtIndexPath:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Vendoo/ItemTableViewController.swift"
timestampString = "501291030.615232"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "254"
endingLineNumber = "254"
landmarkName = "tableView(_:cellForRowAtIndexPath:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>

View File

@ -20,6 +20,7 @@ class ItemCell: UITableViewCell, UICollectionViewDelegate {
@IBOutlet weak var itemStatus: UILabel!
@IBOutlet weak var itemPrice: UILabel!
@IBOutlet weak var networks: UICollectionView!
var selectedNetworks: [String] = []
override func awakeFromNib() {
@ -36,6 +37,10 @@ class ItemCell: UITableViewCell, UICollectionViewDelegate {
// Configure the view for the selected state
}
func addNetwork(network: String){
self.selectedNetworks.append(network)
}
}
@ -51,14 +56,14 @@ extension ItemCell: UICollectionViewDataSource{
func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
// #warning Incomplete implementation, return the number of items
return 4
return selectedNetworks.count
}
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
let cell: UICollectionViewCell!
switch (indexPath.row){
let cell: NetworkCollectionViewCell! = self.networks.dequeueReusableCellWithReuseIdentifier("network", forIndexPath: indexPath) as! NetworkCollectionViewCell
cell.setImg(selectedNetworks[indexPath.row])
/*switch (indexPath.row){
case 0:
cell = collectionView.dequeueReusableCellWithReuseIdentifier("ebay", forIndexPath: indexPath)
break
@ -71,7 +76,7 @@ extension ItemCell: UICollectionViewDataSource{
default:
cell = collectionView.dequeueReusableCellWithReuseIdentifier("facebook", forIndexPath: indexPath)
break
}
}*/
// Configure the cell (in this case show or hide the cell depending on which network the item is being listed on)

View File

@ -178,20 +178,26 @@ extension ItemTableViewController: UITableViewDataSource{
if(!((self.tabBarController as? HomeViewController)!.userListings[indexPath.row].networks["areNetworksChosen"])!){
cell.networks.hidden = true
}else{
cell.selectedNetworks = []
dispatch_async(dispatch_get_main_queue(), {
if(!((self.tabBarController as? HomeViewController)!.userListings[indexPath.row].networks["ebay"])!){
cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 0, inSection: 0))?.hidden = true
if(((self.tabBarController as? HomeViewController)!.userListings[indexPath.row].networks["ebay"])!){
//cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 0, inSection: 0))?.hidden = true
cell.addNetwork("ebay_icon")
}
if(!((self.tabBarController as? HomeViewController)!.userListings[indexPath.row].networks["amazon"])!){
cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 1, inSection: 0))?.hidden = true
if(((self.tabBarController as? HomeViewController)!.userListings[indexPath.row].networks["amazon"])!){
//cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 1, inSection: 0))?.hidden = true
cell.addNetwork("amazon_icon")
}
if(!((self.tabBarController as? HomeViewController)!.userListings[indexPath.row].networks["etsy"])!){
cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 2, inSection: 0))?.hidden = true
if(((self.tabBarController as? HomeViewController)!.userListings[indexPath.row].networks["etsy"])!){
//cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 2, inSection: 0))?.hidden = true
cell.addNetwork("etsy_icon")
}
if(!((self.tabBarController as? HomeViewController)!.userListings[indexPath.row].networks["facebook"])!){
cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 3, inSection: 0))?.hidden = true
if(((self.tabBarController as? HomeViewController)!.userListings[indexPath.row].networks["facebook"])!){
//cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 3, inSection: 0))?.hidden = true
cell.addNetwork("facebook_icon")
}
cell.networks.reloadData()
})
@ -208,21 +214,26 @@ extension ItemTableViewController: UITableViewDataSource{
if(!((self.tabBarController as? HomeViewController)!.endedListings[indexPath.row].networks["areNetworksChosen"])!){
cell.networks.hidden = true
}else{
cell.selectedNetworks = []
dispatch_async(dispatch_get_main_queue(), {
if(!((self.tabBarController as? HomeViewController)!.endedListings[indexPath.row].networks["ebay"])!){
cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 0, inSection: 0))?.hidden = true
if(((self.tabBarController as? HomeViewController)!.endedListings[indexPath.row].networks["ebay"])!){
//cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 0, inSection: 0))?.hidden = true
cell.addNetwork("ebay_icon")
}
if(!((self.tabBarController as? HomeViewController)!.endedListings[indexPath.row].networks["amazon"])!){
cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 1, inSection: 0))?.hidden = true
if(((self.tabBarController as? HomeViewController)!.endedListings[indexPath.row].networks["amazon"])!){
//cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 1, inSection: 0))?.hidden = true
cell.addNetwork("amazon_icon")
}
if(!((self.tabBarController as? HomeViewController)!.endedListings[indexPath.row].networks["etsy"])!){
cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 2, inSection: 0))?.hidden = true
if(((self.tabBarController as? HomeViewController)!.endedListings[indexPath.row].networks["etsy"])!){
//cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 2, inSection: 0))?.hidden = true
cell.addNetwork("etsy_icon")
}
if(!((self.tabBarController as? HomeViewController)!.endedListings[indexPath.row].networks["facebook"])!){
cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 3, inSection: 0))?.hidden = true
if(((self.tabBarController as? HomeViewController)!.endedListings[indexPath.row].networks["facebook"])!){
//cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 3, inSection: 0))?.hidden = true
cell.addNetwork("facebook_icon")
}
cell.networks.reloadData()
})
}
@ -238,21 +249,26 @@ extension ItemTableViewController: UITableViewDataSource{
if(!((self.tabBarController as? HomeViewController)!.soldListings[indexPath.row].networks["areNetworksChosen"])!){
cell.networks.hidden = true
}else{
cell.selectedNetworks = []
dispatch_async(dispatch_get_main_queue(), {
if(!((self.tabBarController as? HomeViewController)!.soldListings[indexPath.row].networks["ebay"])!){
cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 0, inSection: 0))?.hidden = true
if(((self.tabBarController as? HomeViewController)!.endedListings[indexPath.row].networks["ebay"])!){
//cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 0, inSection: 0))?.hidden = true
cell.addNetwork("ebay_icon")
}
if(!((self.tabBarController as? HomeViewController)!.soldListings[indexPath.row].networks["amazon"])!){
cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 1, inSection: 0))?.hidden = true
if(((self.tabBarController as? HomeViewController)!.endedListings[indexPath.row].networks["amazon"])!){
//cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 1, inSection: 0))?.hidden = true
cell.addNetwork("amazon_icon")
}
if(!((self.tabBarController as? HomeViewController)!.soldListings[indexPath.row].networks["etsy"])!){
cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 2, inSection: 0))?.hidden = true
if(((self.tabBarController as? HomeViewController)!.endedListings[indexPath.row].networks["etsy"])!){
//cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 2, inSection: 0))?.hidden = true
cell.addNetwork("etsy_icon")
}
if(!((self.tabBarController as? HomeViewController)!.soldListings[indexPath.row].networks["facebook"])!){
cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 3, inSection: 0))?.hidden = true
if(((self.tabBarController as? HomeViewController)!.endedListings[indexPath.row].networks["facebook"])!){
//cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 3, inSection: 0))?.hidden = true
cell.addNetwork("facebook_icon")
}
cell.networks.reloadData()
})
}

View File

@ -49,6 +49,7 @@ class ListingPreviewViewController: UIViewController {
private var newInProgressListing: Dictionary<String,AnyObject> = Dictionary<String, AnyObject>()
var loadingView: UIView!
private var itemViewState = ""
private var selectedNetworks : [String] = []
override func viewDidLoad() {
super.viewDidLoad()
@ -126,6 +127,11 @@ class ListingPreviewViewController: UIViewController {
func setDictionary(netdictionary:Dictionary<String, Bool>, itemdictionary: Dictionary<String, AnyObject!>){
self.networksDictionary = netdictionary
for (k,v) in self.networksDictionary {
if ((k != "areNetworksChosen") && v) {
self.selectedNetworks.append("\(k)_icon")
}
}
self.itemListingDictionary = itemdictionary
}
@ -785,14 +791,14 @@ extension ListingPreviewViewController: UICollectionViewDataSource {
func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
// #warning Incomplete implementation, return the number of items
return 4
return self.selectedNetworks.count
}
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
let cell: UICollectionViewCell!
switch (indexPath.row){
let cell: NetworkCollectionViewCell! = self.networks.dequeueReusableCellWithReuseIdentifier("network", forIndexPath: indexPath) as! NetworkCollectionViewCell
cell.setImg(selectedNetworks[indexPath.row])
/*switch (indexPath.row){
case 0:
cell = collectionView.dequeueReusableCellWithReuseIdentifier("ebay", forIndexPath: indexPath)
@ -834,7 +840,7 @@ extension ListingPreviewViewController: UICollectionViewDataSource {
cell.hidden = false
}
break
}
}*/
return cell

View File

@ -960,14 +960,14 @@
<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="ebay" id="qet-e3-dU6">
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="network" id="qet-e3-dU6" customClass="NetworkCollectionViewCell" customModule="Vendoo" customModuleProvider="target">
<rect key="frame" x="0.0" y="10.5" width="40" height="40"/>
<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="40" height="40"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ebay_icon" id="foe-h9-YV3">
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="foe-h9-YV3">
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
@ -975,51 +975,9 @@
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<size key="customSize" width="40" height="40"/>
</collectionViewCell>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" tag="1" contentMode="center" reuseIdentifier="amazon" id="SEr-aZ-MWl">
<rect key="frame" x="45" y="10.5" width="40" height="40"/>
<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="40" height="40"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="amazon_icon" id="lvj-td-42B">
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</collectionViewCell>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" tag="2" contentMode="center" reuseIdentifier="etsy" id="IdF-c7-R14">
<rect key="frame" x="90" y="10.5" width="40" height="40"/>
<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="40" height="40"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="etsy_icon" id="tYI-Hw-7cX">
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</collectionViewCell>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" tag="3" contentMode="center" reuseIdentifier="facebook" id="yWZ-NA-tkb">
<rect key="frame" x="135" y="10.5" width="40" height="40"/>
<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="40" height="40"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="facebook_icon" id="SQd-oN-sep">
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<connections>
<outlet property="image" destination="foe-h9-YV3" id="Fsz-Jd-jJm"/>
</connections>
</collectionViewCell>
</cells>
</collectionView>
@ -1312,66 +1270,23 @@
<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="ebay" id="bUa-Lo-TSK">
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="network" id="ghV-td-Qeu" customClass="NetworkCollectionViewCell" customModule="Vendoo" customModuleProvider="target">
<rect key="frame" x="0.0" y="10.5" width="40" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ebay_icon" id="DNZ-zs-kfB">
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<size key="customSize" width="40" height="40"/>
</collectionViewCell>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" tag="1" contentMode="center" reuseIdentifier="amazon" id="mXI-4r-eAB">
<rect key="frame" x="45" y="10.5" width="40" height="40"/>
<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="40" height="40"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="amazon_icon" id="qMF-yN-5zO">
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</collectionViewCell>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" tag="2" contentMode="center" reuseIdentifier="etsy" id="8Ch-qr-5oN">
<rect key="frame" x="90" y="10.5" width="40" height="40"/>
<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="40" height="40"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="etsy_icon" id="mUA-J8-ltB">
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</collectionViewCell>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" tag="3" contentMode="center" reuseIdentifier="facebook" id="iK6-ar-Cjj">
<rect key="frame" x="135" y="10.5" width="40" height="40"/>
<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="40" height="40"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="facebook_icon" id="RDy-7i-gVn">
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="2ua-w7-8jf">
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<connections>
<outlet property="image" destination="2ua-w7-8jf" id="Afj-7t-KBG"/>
</connections>
</collectionViewCell>
</cells>
</collectionView>

View File

@ -0,0 +1,18 @@
//
// NetworkCollectionViewCell.swift
// Vendoo
//
// Created by Okechi Onyeje on 11/19/16.
// Copyright © 2016 Okechi Onyeje. All rights reserved.
//
import UIKit
class NetworkCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var image: UIImageView!
func setImg(networkIcon: String!){
self.image.image = UIImage(named: networkIcon)
}
}