diff --git a/.DS_Store b/.DS_Store index 1901e03..da681fb 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Vendoo.xcodeproj/project.pbxproj b/Vendoo.xcodeproj/project.pbxproj index 0e02af4..ebdb05e 100644 --- a/Vendoo.xcodeproj/project.pbxproj +++ b/Vendoo.xcodeproj/project.pbxproj @@ -30,6 +30,7 @@ 3EC325281CF86B5400626C48 /* Services.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3EC325271CF86B5400626C48 /* Services.plist */; }; 3EC3252D1CF894C400626C48 /* ItemImagePickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EC3252C1CF894C400626C48 /* ItemImagePickerViewController.swift */; }; 3EC3252F1CF894E500626C48 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EC3252E1CF894E500626C48 /* AVFoundation.framework */; }; + 3ECEDB871CF9C722003566B3 /* ListingPreviewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3ECEDB861CF9C722003566B3 /* ListingPreviewViewController.swift */; }; CA20AB81F709511F1A8C7963 /* Pods_VendooTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D05AEDAE485B93305CC629B5 /* Pods_VendooTests.framework */; }; D5995A6D02C7FCA4F561AAB3 /* Pods_Vendoo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8F69918E43DC1276F42551F /* Pods_Vendoo.framework */; }; /* End PBXBuildFile section */ @@ -83,6 +84,7 @@ 3EC325271CF86B5400626C48 /* Services.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Services.plist; sourceTree = ""; }; 3EC3252C1CF894C400626C48 /* ItemImagePickerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemImagePickerViewController.swift; sourceTree = ""; }; 3EC3252E1CF894E500626C48 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + 3ECEDB861CF9C722003566B3 /* ListingPreviewViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListingPreviewViewController.swift; sourceTree = ""; }; 6979B7B8AF7AC049C2F23196 /* Pods-Vendoo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Vendoo.release.xcconfig"; path = "Pods/Target Support Files/Pods-Vendoo/Pods-Vendoo.release.xcconfig"; sourceTree = ""; }; 8FACABBA7656B6698731A6B0 /* Pods_VendooUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_VendooUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C9F6F7897E53ED9583C965E3 /* Pods-Vendoo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Vendoo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Vendoo/Pods-Vendoo.debug.xcconfig"; sourceTree = ""; }; @@ -247,6 +249,7 @@ isa = PBXGroup; children = ( 3EC3252C1CF894C400626C48 /* ItemImagePickerViewController.swift */, + 3ECEDB861CF9C722003566B3 /* ListingPreviewViewController.swift */, ); name = NewItemPostingSession; sourceTree = ""; @@ -548,6 +551,7 @@ 3EC325261CF7E90000626C48 /* FacebookGraphAPIManager.swift in Sources */, 3E7CF3FC1CF5FE9400F486B2 /* RecoverPasswordViewController.swift in Sources */, 3EC325111CF703A600626C48 /* ItemCell.swift in Sources */, + 3ECEDB871CF9C722003566B3 /* ListingPreviewViewController.swift in Sources */, 3EC325231CF7DA5500626C48 /* HomeViewController.swift in Sources */, 3EC3252D1CF894C400626C48 /* ItemImagePickerViewController.swift in Sources */, 3E7CF4011CF6366300F486B2 /* EtsyRESTAPIManager.swift in Sources */, diff --git a/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/UserInterfaceState.xcuserstate b/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/UserInterfaceState.xcuserstate index ac31468..4210765 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 9ec3427..41fdc58 100644 --- a/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -10,11 +10,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "Vendoo/EtsyRESTAPIManager.swift" - timestampString = "486046132.350173" + timestampString = "486128108.896927" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "54" - endingLineNumber = "54" + startingLineNumber = "57" + endingLineNumber = "57" landmarkName = "authorizeApp(_:)" landmarkType = "5"> @@ -26,11 +26,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "Vendoo/EtsyRESTAPIManager.swift" - timestampString = "486046132.350173" + timestampString = "486128108.896927" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "63" - endingLineNumber = "63" + startingLineNumber = "66" + endingLineNumber = "66" landmarkName = "authorizeApp(_:)" landmarkType = "5"> @@ -42,11 +42,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "Vendoo/FacebookGraphAPIManager.swift" - timestampString = "486046120.823696" + timestampString = "486128108.896927" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "42" - endingLineNumber = "42" + startingLineNumber = "43" + endingLineNumber = "43" landmarkName = "authorizeApp(_:)" landmarkType = "5"> @@ -58,11 +58,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "Vendoo/NetworksTableViewController.swift" - timestampString = "486108018.734981" + timestampString = "486128108.896927" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "54" - endingLineNumber = "54" + startingLineNumber = "55" + endingLineNumber = "55" landmarkName = "setNetworkSelectFunctionality(_:)" landmarkType = "5"> @@ -74,14 +74,30 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "Vendoo/NetworksTableViewController.swift" - timestampString = "486108469.75046" + timestampString = "486128108.896927" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "90" - endingLineNumber = "90" + startingLineNumber = "91" + endingLineNumber = "91" landmarkName = "tableView(_:cellForRowAtIndexPath:)" landmarkType = "5"> + + + + diff --git a/Vendoo/.DS_Store b/Vendoo/.DS_Store index 3312860..92ab870 100644 Binary files a/Vendoo/.DS_Store and b/Vendoo/.DS_Store differ diff --git a/Vendoo/Base.lproj/Main.storyboard b/Vendoo/Base.lproj/Main.storyboard index f990ac9..16db3d3 100644 --- a/Vendoo/Base.lproj/Main.storyboard +++ b/Vendoo/Base.lproj/Main.storyboard @@ -443,12 +443,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -616,10 +841,10 @@ - + - + diff --git a/Vendoo/EtsyRESTAPIManager.swift b/Vendoo/EtsyRESTAPIManager.swift index d5907ab..e38cbb1 100644 --- a/Vendoo/EtsyRESTAPIManager.swift +++ b/Vendoo/EtsyRESTAPIManager.swift @@ -24,6 +24,7 @@ class EtsyRESTAPIManager: NSObject { private var apiKey: String! private var apiSecret: String! + var isAuthorized: Bool = NSUserDefaults.standardUserDefaults().boolForKey("etsyAuthorized") //---------------------------------------------// //User specific class variables @@ -37,6 +38,8 @@ class EtsyRESTAPIManager: NSObject { self.apiKey = ((dict["Etsy"] as! Dictionary)["consumerKey"] as! String) self.apiSecret = ((dict["Etsy"] as! Dictionary)["consumerSecret"] as! String) } + + } @@ -83,6 +86,12 @@ extension EtsyRESTAPIManager { }) */ + + //once everything is authorized save true value to the authorization boolean + /* + NSUserDefaults.standardUserDefaults().setBool(true, forKey: "etsyAuthorized") + self.isAuthorized = NSUserDefaults.standardUserDefaults().boolForKey("etsyAuthorized") + */ } diff --git a/Vendoo/FacebookGraphAPIManager.swift b/Vendoo/FacebookGraphAPIManager.swift index 71c7881..cf6a2c0 100644 --- a/Vendoo/FacebookGraphAPIManager.swift +++ b/Vendoo/FacebookGraphAPIManager.swift @@ -21,6 +21,7 @@ class FacebookGraphAPIManager: NSObject { private var apiKey: String! private var apiSecret: String! + var isAuthorized: Bool = NSUserDefaults.standardUserDefaults().boolForKey("fbAuthorized") //---------------------------------------------// override init(){ @@ -54,6 +55,12 @@ extension FacebookGraphAPIManager { }, failure: { error in print(error.localizedDescription, terminator: "") }) + + //once everything is authorized save true value to the authorization boolean + /* + NSUserDefaults.standardUserDefaults().setBool(true, forKey: "etsyAuthorized") + self.isAuthorized = NSUserDefaults.standardUserDefaults().boolForKey("fbAuthorized") + */ } } diff --git a/Vendoo/ListingPreviewViewController.swift b/Vendoo/ListingPreviewViewController.swift new file mode 100644 index 0000000..c12c6bb --- /dev/null +++ b/Vendoo/ListingPreviewViewController.swift @@ -0,0 +1,60 @@ +// +// ListingPreviewViewController.swift +// Vendoo +// +// Created by Okechi Onyeje on 5/28/16. +// Copyright © 2016 Okechi Onyeje. All rights reserved. +// + +import UIKit + +class ListingPreviewViewController: UIViewController { + + //IBOutlets + @IBOutlet weak var containerScrollView: UIScrollView! + @IBOutlet weak var itemPicture: UIImageView! + @IBOutlet weak var itemTitle: UITextView! + @IBOutlet weak var itemDescription: UITextView! + @IBOutlet weak var itemPrice: UITextView! + @IBOutlet weak var itemCategory: UITextView! + @IBOutlet weak var networks: UICollectionView! + + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { + // Get the new view controller using segue.destinationViewController. + // Pass the selected object to the new view controller. + } + */ + +} + +//MARK: - IBActions +extension ListingPreviewViewController { + + + @IBAction func publishItem(sender: AnyObject) { + + } + + @IBAction func draftItem(sender: AnyObject) { + + } + + +} diff --git a/Vendoo/NetworksTableViewController.swift b/Vendoo/NetworksTableViewController.swift index 37da2fb..8b89029 100644 --- a/Vendoo/NetworksTableViewController.swift +++ b/Vendoo/NetworksTableViewController.swift @@ -29,8 +29,8 @@ class NetworksTableViewController: UIViewController { //temporary class variables /*TESTING*/ - let etsyManager = EtsyRESTAPIManager() - let fbGraphManager = FacebookGraphAPIManager() + //let etsyManager = EtsyRESTAPIManager() + //let fbGraphManager = FacebookGraphAPIManager() override func viewDidLoad() { super.viewDidLoad() @@ -66,6 +66,10 @@ extension NetworksTableViewController { override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. + + if(segue.identifier == "ItemPreviewSegue"){ + + } } } @@ -93,6 +97,7 @@ extension NetworksTableViewController: UITableViewDataSource { switch (indexPath.row){ case 0: + //loads network cell for ebay cell = (self.tableView.dequeueReusableCellWithIdentifier("ebay", forIndexPath: indexPath) as! EbayTableViewCell) break @@ -173,6 +178,7 @@ extension NetworksTableViewController: UITableViewDelegate { //code to deselect network self.networksDictionary["ebay"] = false + } else{ @@ -374,12 +380,12 @@ extension NetworksTableViewController: UITableViewDelegate { //this is the type of code desired to access the rest management classes - /* + let tabBar = self.tabBarController (tabBar as? HomeViewController)?.etsyManager.authorizeApp(self) - */ - self.etsyManager.authorizeApp(self) + + //self.etsyManager.authorizeApp(self) } break @@ -409,12 +415,12 @@ extension NetworksTableViewController: UITableViewDelegate { //code to authorize network //this is the type of code desired to access the rest management classes - /* + let tabBar = self.tabBarController (tabBar as? HomeViewController)?.fbGraphManager.authorizeApp(self) - */ - self.fbGraphManager.authorizeApp(self) + + //self.fbGraphManager.authorizeApp(self) }