diff --git a/Vendoo.xcodeproj/project.pbxproj b/Vendoo.xcodeproj/project.pbxproj index 5f0cc46..59df3ab 100644 --- a/Vendoo.xcodeproj/project.pbxproj +++ b/Vendoo.xcodeproj/project.pbxproj @@ -31,6 +31,7 @@ 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 */; }; + 3EB54E101DE1397A006D918B /* Not_TableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EB54E0F1DE1397A006D918B /* Not_TableViewCell.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 */; }; @@ -101,6 +102,7 @@ 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 = ""; }; + 3EB54E0F1DE1397A006D918B /* Not_TableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Not_TableViewCell.swift; sourceTree = ""; }; 3EC325101CF703A600626C48 /* ItemCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemCell.swift; sourceTree = ""; }; 3EC325141CF7104300626C48 /* ItemTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemTableViewController.swift; sourceTree = ""; }; 3EC3251D1CF734C100626C48 /* NetworksTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworksTableViewController.swift; sourceTree = ""; }; @@ -339,6 +341,7 @@ children = ( 3EE734E71DCD34B900F771AE /* NotificationTableViewCell.swift */, 3EE734E51DCD34AE00F771AE /* NotificationsViewController.swift */, + 3EB54E0F1DE1397A006D918B /* Not_TableViewCell.swift */, ); name = Notifications; sourceTree = ""; @@ -776,6 +779,7 @@ 3E1DC3CF1D42328C0091BC60 /* CategoryCell.swift in Sources */, 3EC325111CF703A600626C48 /* ItemCell.swift in Sources */, 3E3A004A1D76680E00A3A5B6 /* ServiceNotificationManager.swift in Sources */, + 3EB54E101DE1397A006D918B /* Not_TableViewCell.swift in Sources */, 3EA668A11D02836C00EE57A8 /* EbayWebServiceManager.swift in Sources */, 3EF422B21D73262000B9A3EB /* UserCell.swift in Sources */, 3ECEDB871CF9C722003566B3 /* ListingPreviewViewController.swift in Sources */, diff --git a/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/UserInterfaceState.xcuserstate b/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/UserInterfaceState.xcuserstate index d9a76a8..ed50d3a 100644 Binary files a/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/UserInterfaceState.xcuserstate and b/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index bd3992a..21c9e4e 100644 --- a/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -186,7 +186,7 @@ moduleName = "Vendoo" usesParentBreakpointCondition = "Yes" urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/CategoriesTableViewController.swift" - timestampString = "501291173.047822" + timestampString = "501429659.558836" 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 = "501291173.047982" + timestampString = "501429659.559" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" startingLineNumber = "572" @@ -543,53 +543,6 @@ endingLineNumber = "625" landmarkName = "getListingInfo(_:onCompletion:)" landmarkType = "5"> - - - - - - - - + + + + + + + + diff --git a/Vendoo/.DS_Store b/Vendoo/.DS_Store index 2f7f955..cf8ea48 100644 Binary files a/Vendoo/.DS_Store and b/Vendoo/.DS_Store differ diff --git a/Vendoo/HomeViewController.swift b/Vendoo/HomeViewController.swift index a1326c5..d1cdf12 100644 --- a/Vendoo/HomeViewController.swift +++ b/Vendoo/HomeViewController.swift @@ -38,7 +38,7 @@ class HomeViewController: UITabBarController { let listingDict = userDict!["user_Listings"] as? [String : AnyObject] //sync notifications - /*if userDict!["notifications"] != nil { + if userDict!["notifications"] != nil { self.notifications = [] for (_, v) in userDict!["notifications"] as! [String : AnyObject] { if v["seen"] as! Bool == false { @@ -47,7 +47,7 @@ class HomeViewController: UITabBarController { } NSUserDefaults.standardUserDefaults().setObject(self.notifications, forKey: "notifications") - }*/ + } NSUserDefaults.standardUserDefaults().setObject(userDict!["name"] as? String, forKey: "name") diff --git a/Vendoo/Main.storyboard b/Vendoo/Main.storyboard index 721f882..16a3c1d 100755 --- a/Vendoo/Main.storyboard +++ b/Vendoo/Main.storyboard @@ -829,7 +829,7 @@ - + @@ -1393,7 +1393,7 @@ - + @@ -1421,6 +1421,7 @@ + @@ -1567,7 +1568,7 @@ - + @@ -1643,7 +1644,7 @@ - + @@ -1660,7 +1661,7 @@ - + @@ -2418,11 +2419,11 @@ - - + - + + diff --git a/Vendoo/MenuPanelViewController.swift b/Vendoo/MenuPanelViewController.swift index 89eb499..97a57f2 100644 --- a/Vendoo/MenuPanelViewController.swift +++ b/Vendoo/MenuPanelViewController.swift @@ -11,6 +11,7 @@ import FirebaseAuth import Locksmith class MenuPanelViewController: UIViewController{ + var count = (NSUserDefaults.standardUserDefaults().objectForKey("notifications") == nil ? 0 : (NSUserDefaults.standardUserDefaults().objectForKey("notifications") as! [Dictionary]).count) //Outlets @IBOutlet weak var table: UITableView! @@ -107,8 +108,10 @@ extension MenuPanelViewController: UITableViewDataSource (cell as! UserCell).email.text = (NSUserDefaults.standardUserDefaults().objectForKey("email") as? String)! break case 1: - cell = self.table.dequeueReusableCellWithIdentifier("Notifications_Cell")! - break + let cellN: Not_TableViewCell! + cellN = self.table.dequeueReusableCellWithIdentifier("Notifications_Cell")! as! Not_TableViewCell + cellN.count.text = "\(count)" + return cellN case 2: cell = self.table.dequeueReusableCellWithIdentifier("Settings_Cell")! break diff --git a/Vendoo/Not_TableViewCell.swift b/Vendoo/Not_TableViewCell.swift new file mode 100644 index 0000000..c950abd --- /dev/null +++ b/Vendoo/Not_TableViewCell.swift @@ -0,0 +1,25 @@ +// +// TableViewCell.swift +// Vendoo +// +// Created by Okechi Onyeje on 11/19/16. +// Copyright © 2016 Okechi Onyeje. All rights reserved. +// + +import UIKit + +class Not_TableViewCell: UITableViewCell { + @IBOutlet weak var count: UILabel! + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + } + + override func setSelected(selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } + +}