mirror of
https://bitbucket.org/vendoo/vendoo_v1.0.git
synced 2025-12-25 03:37:39 +00:00
Notification count implemented
This commit is contained in:
parent
fc98abd596
commit
4f8062daec
@ -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 = "<group>"; };
|
||||
3EB54E0F1DE1397A006D918B /* Not_TableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Not_TableViewCell.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>"; };
|
||||
@ -339,6 +341,7 @@
|
||||
children = (
|
||||
3EE734E71DCD34B900F771AE /* NotificationTableViewCell.swift */,
|
||||
3EE734E51DCD34AE00F771AE /* NotificationsViewController.swift */,
|
||||
3EB54E0F1DE1397A006D918B /* Not_TableViewCell.swift */,
|
||||
);
|
||||
name = Notifications;
|
||||
sourceTree = "<group>";
|
||||
@ -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 */,
|
||||
|
||||
Binary file not shown.
@ -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">
|
||||
<Locations>
|
||||
<Location
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.EtsyRESTAPIManager.getListingInfo (Swift.String, onCompletion : Swift.Optional<(Swift.Optional<Swift.AnyObject>, Swift.Optional<__ObjC.NSError>) -> ()>) -> ()"
|
||||
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<(Swift.Optional<Swift.AnyObject>, Swift.Optional<__ObjC.NSError>) -> ()>) -> ()).(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<(Swift.Optional<Swift.AnyObject>, Swift.Optional<__ObjC.NSError>) -> ()>) -> ()).(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
|
||||
@ -704,5 +657,37 @@
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/MenuPanelViewController.swift"
|
||||
timestampString = "501343346.000481"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "112"
|
||||
endingLineNumber = "112"
|
||||
landmarkName = "tableView(_:cellForRowAtIndexPath:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/HomeViewController.swift"
|
||||
timestampString = "501429562.960347"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "41"
|
||||
endingLineNumber = "41"
|
||||
landmarkName = "viewDidLoad()"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
</Breakpoints>
|
||||
</Bucket>
|
||||
|
||||
BIN
Vendoo/.DS_Store
vendored
BIN
Vendoo/.DS_Store
vendored
Binary file not shown.
@ -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")
|
||||
|
||||
|
||||
@ -829,7 +829,7 @@
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="K0z-pp-hzH">
|
||||
<rect key="frame" x="0.0" y="46" width="375" height="211"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="1" green="0.94432476799999998" blue="0.29461320000000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" tag="1" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="LsU-De-laD" userLabel="Image 1">
|
||||
<rect key="frame" x="286" y="262" width="81" height="56"/>
|
||||
@ -1393,7 +1393,7 @@
|
||||
<outlet property="name" destination="QxU-Ol-czq" id="GGJ-j1-f1P"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Notifications_Cell" id="TpL-A6-BYb">
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Notifications_Cell" id="TpL-A6-BYb" customClass="Not_TableViewCell" customModule="Vendoo" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="45" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="TpL-A6-BYb" id="8n5-6b-Lkb">
|
||||
@ -1421,6 +1421,7 @@
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="count" destination="YAq-k9-mKp" id="h9I-UA-fQW"/>
|
||||
<segue destination="RA5-cu-shk" kind="custom" customClass="SWRevealViewControllerSeguePushController" id="Yor-9j-5ft"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
@ -1567,7 +1568,7 @@
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="notification_cell" rowHeight="69" id="9G8-XI-ptI" customClass="NotificationTableViewCell" customModule="Vendoo" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="72" width="375" height="69"/>
|
||||
<rect key="frame" x="0.0" y="92" width="375" height="69"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="9G8-XI-ptI" id="r3f-6Q-p1g">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="68.5"/>
|
||||
@ -1643,7 +1644,7 @@
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Change_Pass_Cell" id="ceq-sl-ClT">
|
||||
<rect key="frame" x="0.0" y="72" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="92" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ceq-sl-ClT" id="Waq-fu-UxD">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
|
||||
@ -1660,7 +1661,7 @@
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Delete_Account_Cell" id="Lha-cf-Sfc">
|
||||
<rect key="frame" x="0.0" y="116" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="136" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Lha-cf-Sfc" id="kmF-Sb-d0c">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
|
||||
@ -2418,11 +2419,11 @@
|
||||
<image name="start" width="50" height="50"/>
|
||||
</resources>
|
||||
<inferredMetricsTieBreakers>
|
||||
<segue reference="rkZ-c8-XJc"/>
|
||||
<segue reference="nUj-1v-ftF"/>
|
||||
<segue reference="Sz0-BH-2me"/>
|
||||
<segue reference="syc-IR-LNQ"/>
|
||||
<segue reference="nWA-7e-2Ec"/>
|
||||
<segue reference="NOz-ya-avj"/>
|
||||
<segue reference="nUj-1v-ftF"/>
|
||||
<segue reference="rkZ-c8-XJc"/>
|
||||
<segue reference="KKl-Gj-ZVc"/>
|
||||
</inferredMetricsTieBreakers>
|
||||
<color key="tintColor" red="0.2784313725" green="0.80392156859999997" blue="0.68235294120000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
|
||||
@ -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<String, AnyObject>]).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
|
||||
|
||||
25
Vendoo/Not_TableViewCell.swift
Normal file
25
Vendoo/Not_TableViewCell.swift
Normal file
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user