added ListingPreviewViewController, to display the draft of a new item listing before publishing, this is the skeleton code for the api logic to be inserted later

This commit is contained in:
Okechi Onyeje 2016-05-28 08:44:15 -04:00
parent c59e079b21
commit 53f949611a
10 changed files with 352 additions and 25 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -30,6 +30,7 @@
3EC325281CF86B5400626C48 /* Services.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3EC325271CF86B5400626C48 /* Services.plist */; }; 3EC325281CF86B5400626C48 /* Services.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3EC325271CF86B5400626C48 /* Services.plist */; };
3EC3252D1CF894C400626C48 /* ItemImagePickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EC3252C1CF894C400626C48 /* ItemImagePickerViewController.swift */; }; 3EC3252D1CF894C400626C48 /* ItemImagePickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EC3252C1CF894C400626C48 /* ItemImagePickerViewController.swift */; };
3EC3252F1CF894E500626C48 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EC3252E1CF894E500626C48 /* AVFoundation.framework */; }; 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 */; }; 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 */; }; D5995A6D02C7FCA4F561AAB3 /* Pods_Vendoo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8F69918E43DC1276F42551F /* Pods_Vendoo.framework */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
@ -83,6 +84,7 @@
3EC325271CF86B5400626C48 /* Services.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Services.plist; sourceTree = "<group>"; }; 3EC325271CF86B5400626C48 /* Services.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Services.plist; sourceTree = "<group>"; };
3EC3252C1CF894C400626C48 /* ItemImagePickerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemImagePickerViewController.swift; sourceTree = "<group>"; }; 3EC3252C1CF894C400626C48 /* ItemImagePickerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemImagePickerViewController.swift; sourceTree = "<group>"; };
3EC3252E1CF894E500626C48 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 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 = "<group>"; };
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 = "<group>"; }; 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 = "<group>"; };
8FACABBA7656B6698731A6B0 /* Pods_VendooUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_VendooUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 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 = "<group>"; }; 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 = "<group>"; };
@ -247,6 +249,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
3EC3252C1CF894C400626C48 /* ItemImagePickerViewController.swift */, 3EC3252C1CF894C400626C48 /* ItemImagePickerViewController.swift */,
3ECEDB861CF9C722003566B3 /* ListingPreviewViewController.swift */,
); );
name = NewItemPostingSession; name = NewItemPostingSession;
sourceTree = "<group>"; sourceTree = "<group>";
@ -548,6 +551,7 @@
3EC325261CF7E90000626C48 /* FacebookGraphAPIManager.swift in Sources */, 3EC325261CF7E90000626C48 /* FacebookGraphAPIManager.swift in Sources */,
3E7CF3FC1CF5FE9400F486B2 /* RecoverPasswordViewController.swift in Sources */, 3E7CF3FC1CF5FE9400F486B2 /* RecoverPasswordViewController.swift in Sources */,
3EC325111CF703A600626C48 /* ItemCell.swift in Sources */, 3EC325111CF703A600626C48 /* ItemCell.swift in Sources */,
3ECEDB871CF9C722003566B3 /* ListingPreviewViewController.swift in Sources */,
3EC325231CF7DA5500626C48 /* HomeViewController.swift in Sources */, 3EC325231CF7DA5500626C48 /* HomeViewController.swift in Sources */,
3EC3252D1CF894C400626C48 /* ItemImagePickerViewController.swift in Sources */, 3EC3252D1CF894C400626C48 /* ItemImagePickerViewController.swift in Sources */,
3E7CF4011CF6366300F486B2 /* EtsyRESTAPIManager.swift in Sources */, 3E7CF4011CF6366300F486B2 /* EtsyRESTAPIManager.swift in Sources */,

View File

@ -10,11 +10,11 @@
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Vendoo/EtsyRESTAPIManager.swift" filePath = "Vendoo/EtsyRESTAPIManager.swift"
timestampString = "486046132.350173" timestampString = "486128108.896927"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "54" startingLineNumber = "57"
endingLineNumber = "54" endingLineNumber = "57"
landmarkName = "authorizeApp(_:)" landmarkName = "authorizeApp(_:)"
landmarkType = "5"> landmarkType = "5">
</BreakpointContent> </BreakpointContent>
@ -26,11 +26,11 @@
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Vendoo/EtsyRESTAPIManager.swift" filePath = "Vendoo/EtsyRESTAPIManager.swift"
timestampString = "486046132.350173" timestampString = "486128108.896927"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "63" startingLineNumber = "66"
endingLineNumber = "63" endingLineNumber = "66"
landmarkName = "authorizeApp(_:)" landmarkName = "authorizeApp(_:)"
landmarkType = "5"> landmarkType = "5">
</BreakpointContent> </BreakpointContent>
@ -42,11 +42,11 @@
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Vendoo/FacebookGraphAPIManager.swift" filePath = "Vendoo/FacebookGraphAPIManager.swift"
timestampString = "486046120.823696" timestampString = "486128108.896927"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "42" startingLineNumber = "43"
endingLineNumber = "42" endingLineNumber = "43"
landmarkName = "authorizeApp(_:)" landmarkName = "authorizeApp(_:)"
landmarkType = "5"> landmarkType = "5">
</BreakpointContent> </BreakpointContent>
@ -58,11 +58,11 @@
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Vendoo/NetworksTableViewController.swift" filePath = "Vendoo/NetworksTableViewController.swift"
timestampString = "486108018.734981" timestampString = "486128108.896927"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "54" startingLineNumber = "55"
endingLineNumber = "54" endingLineNumber = "55"
landmarkName = "setNetworkSelectFunctionality(_:)" landmarkName = "setNetworkSelectFunctionality(_:)"
landmarkType = "5"> landmarkType = "5">
</BreakpointContent> </BreakpointContent>
@ -74,14 +74,30 @@
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Vendoo/NetworksTableViewController.swift" filePath = "Vendoo/NetworksTableViewController.swift"
timestampString = "486108469.75046" timestampString = "486128108.896927"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "90" startingLineNumber = "91"
endingLineNumber = "90" endingLineNumber = "91"
landmarkName = "tableView(_:cellForRowAtIndexPath:)" landmarkName = "tableView(_:cellForRowAtIndexPath:)"
landmarkType = "5"> landmarkType = "5">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Vendoo/NetworksTableViewController.swift"
timestampString = "486128132.689875"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "380"
endingLineNumber = "380"
landmarkName = "tableView(_:didSelectRowAtIndexPath:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints> </Breakpoints>
</Bucket> </Bucket>

BIN
Vendoo/.DS_Store vendored

Binary file not shown.

View File

@ -443,12 +443,237 @@
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/> <simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
<connections> <connections>
<outlet property="tableView" destination="AGX-2L-ee0" id="x1J-Yr-ZYS"/> <outlet property="tableView" destination="AGX-2L-ee0" id="x1J-Yr-ZYS"/>
<segue destination="gfQ-Y2-Mqh" kind="modal" identifier="ItemPreviewSegue" id="Ogu-p5-UtK"/>
</connections> </connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="6Ls-Ti-JQK" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="6Ls-Ti-JQK" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="2179" y="1123"/> <point key="canvasLocation" x="2179" y="1123"/>
</scene> </scene>
<!--Listing Preview-->
<scene sceneID="Qqe-CL-BDJ">
<objects>
<viewController title="Listing Preview" id="gfQ-Y2-Mqh" customClass="ListingPreviewViewController" customModule="Vendoo" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="BQ7-uI-S8u">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="T3U-DI-Ome">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="K0z-pp-hzH">
<rect key="frame" x="20" y="51" width="334" height="219"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="0.94432476799999998" blue="0.29461320000000002" alpha="1" colorSpace="calibratedRGB"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="deQ-F0-uVB">
<rect key="frame" x="124" y="597" width="127" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<state key="normal" title="Publish">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="publishItem:" destination="gfQ-Y2-Mqh" eventType="touchUpInside" id="Qe0-kf-aM4"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="gxH-Kq-KTc">
<rect key="frame" x="124" y="629" width="127" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="0.67444366395349431" blue="0.43274429119575453" alpha="1" colorSpace="calibratedRGB"/>
<state key="normal" title="Save">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="draftItem:" destination="gfQ-Y2-Mqh" eventType="touchUpInside" id="Dss-pL-WfA"/>
</connections>
</button>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" usesAttributedText="YES" id="WuZ-2K-lz7">
<rect key="frame" x="103" y="303" width="251" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<attributedString key="attributedText">
<fragment content="Title">
<attributes>
<font key="NSFont" size="14" name="HelveticaNeue"/>
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
</attributedString>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Title:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0Jj-7R-xmr">
<rect key="frame" x="20" y="308" width="42" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="1" green="0.674443664" blue="0.43274429120000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" usesAttributedText="YES" id="Jh9-KG-0Yt">
<rect key="frame" x="103" y="455" width="251" height="33"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<attributedString key="attributedText">
<fragment content="Price">
<attributes>
<font key="NSFont" size="14" name="HelveticaNeue"/>
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
</attributedString>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Price:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="GAk-e3-1ss">
<rect key="frame" x="20" y="461" width="42" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="1" green="0.674443664" blue="0.43274429120000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Description:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="z8I-Z0-8p7">
<rect key="frame" x="20" y="348" width="88" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="1" green="0.674443664" blue="0.43274429120000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" usesAttributedText="YES" id="u7b-0N-xli">
<rect key="frame" x="103" y="343" width="251" height="104"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<attributedString key="attributedText">
<fragment content="Descripton">
<attributes>
<font key="NSFont" size="14" name="HelveticaNeue"/>
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
</attributedString>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" usesAttributedText="YES" id="ije-TG-4S5">
<rect key="frame" x="103" y="495" width="251" height="33"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<attributedString key="attributedText">
<fragment content="Category">
<attributes>
<font key="NSFont" size="14" name="HelveticaNeue"/>
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
</attributedString>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Category:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Cjd-8T-Gc1">
<rect key="frame" x="20" y="501" width="60" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="1" green="0.674443664" blue="0.43274429120000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<collectionView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" id="MS3-nc-8va">
<rect key="frame" x="103" y="536" width="176" height="61"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="5" minimumInteritemSpacing="5" id="u4o-HY-29n">
<size key="itemSize" width="40" height="40"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<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">
<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">
<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="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>
</collectionViewCell>
</cells>
</collectionView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Networks" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="nDO-rh-gjd">
<rect key="frame" x="20" y="556" width="60" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="1" green="0.674443664" blue="0.43274429120000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</scrollView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
<connections>
<outlet property="containerScrollView" destination="T3U-DI-Ome" id="gad-zv-hsO"/>
<outlet property="itemCategory" destination="ije-TG-4S5" id="XGu-Uw-hLl"/>
<outlet property="itemDescription" destination="u7b-0N-xli" id="d1N-lw-6sw"/>
<outlet property="itemPicture" destination="K0z-pp-hzH" id="6Zm-Ig-Rm3"/>
<outlet property="itemPrice" destination="Jh9-KG-0Yt" id="nbh-aq-W0b"/>
<outlet property="itemTitle" destination="WuZ-2K-lz7" id="EkY-UX-lSj"/>
<outlet property="networks" destination="MS3-nc-8va" id="duP-BL-Qp2"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="RMw-dN-MlZ" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2678.5" y="1115.5"/>
</scene>
<!--items--> <!--items-->
<scene sceneID="mgQ-vQ-YQl"> <scene sceneID="mgQ-vQ-YQl">
<objects> <objects>
@ -616,10 +841,10 @@
</objects> </objects>
<point key="canvasLocation" x="1193.5" y="1073.5"/> <point key="canvasLocation" x="1193.5" y="1073.5"/>
</scene> </scene>
<!--Tab Bar Controller--> <!--Home View Controller-->
<scene sceneID="NWa-1L-Ttk"> <scene sceneID="NWa-1L-Ttk">
<objects> <objects>
<tabBarController id="hCC-Gj-u8y" sceneMemberID="viewController"> <tabBarController id="hCC-Gj-u8y" customClass="HomeViewController" customModule="Vendoo" customModuleProvider="target" sceneMemberID="viewController">
<navigationItem key="navigationItem" id="eef-2X-cmY"/> <navigationItem key="navigationItem" id="eef-2X-cmY"/>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/> <simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
<tabBar key="tabBar" contentMode="scaleToFill" id="mte-XW-wio"> <tabBar key="tabBar" contentMode="scaleToFill" id="mte-XW-wio">

View File

@ -24,6 +24,7 @@ class EtsyRESTAPIManager: NSObject {
private var apiKey: String! private var apiKey: String!
private var apiSecret: String! private var apiSecret: String!
var isAuthorized: Bool = NSUserDefaults.standardUserDefaults().boolForKey("etsyAuthorized")
//---------------------------------------------// //---------------------------------------------//
//User specific class variables //User specific class variables
@ -37,6 +38,8 @@ class EtsyRESTAPIManager: NSObject {
self.apiKey = ((dict["Etsy"] as! Dictionary<String, AnyObject>)["consumerKey"] as! String) self.apiKey = ((dict["Etsy"] as! Dictionary<String, AnyObject>)["consumerKey"] as! String)
self.apiSecret = ((dict["Etsy"] as! Dictionary<String, AnyObject>)["consumerSecret"] as! String) self.apiSecret = ((dict["Etsy"] as! Dictionary<String, AnyObject>)["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")
*/
} }

View File

@ -21,6 +21,7 @@ class FacebookGraphAPIManager: NSObject {
private var apiKey: String! private var apiKey: String!
private var apiSecret: String! private var apiSecret: String!
var isAuthorized: Bool = NSUserDefaults.standardUserDefaults().boolForKey("fbAuthorized")
//---------------------------------------------// //---------------------------------------------//
override init(){ override init(){
@ -54,6 +55,12 @@ extension FacebookGraphAPIManager {
}, failure: { error in }, failure: { error in
print(error.localizedDescription, terminator: "") 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")
*/
} }
} }

View File

@ -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) {
}
}

View File

@ -29,8 +29,8 @@ class NetworksTableViewController: UIViewController {
//temporary class variables /*TESTING*/ //temporary class variables /*TESTING*/
let etsyManager = EtsyRESTAPIManager() //let etsyManager = EtsyRESTAPIManager()
let fbGraphManager = FacebookGraphAPIManager() //let fbGraphManager = FacebookGraphAPIManager()
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -66,6 +66,10 @@ extension NetworksTableViewController {
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
// Get the new view controller using segue.destinationViewController. // Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller. // Pass the selected object to the new view controller.
if(segue.identifier == "ItemPreviewSegue"){
}
} }
} }
@ -93,6 +97,7 @@ extension NetworksTableViewController: UITableViewDataSource {
switch (indexPath.row){ switch (indexPath.row){
case 0: case 0:
//loads network cell for ebay //loads network cell for ebay
cell = (self.tableView.dequeueReusableCellWithIdentifier("ebay", forIndexPath: indexPath) as! EbayTableViewCell) cell = (self.tableView.dequeueReusableCellWithIdentifier("ebay", forIndexPath: indexPath) as! EbayTableViewCell)
break break
@ -174,6 +179,7 @@ extension NetworksTableViewController: UITableViewDelegate {
//code to deselect network //code to deselect network
self.networksDictionary["ebay"] = false self.networksDictionary["ebay"] = false
} }
else{ else{
@ -374,12 +380,12 @@ extension NetworksTableViewController: UITableViewDelegate {
//this is the type of code desired to access the rest management classes //this is the type of code desired to access the rest management classes
/*
let tabBar = self.tabBarController let tabBar = self.tabBarController
(tabBar as? HomeViewController)?.etsyManager.authorizeApp(self) (tabBar as? HomeViewController)?.etsyManager.authorizeApp(self)
*/
self.etsyManager.authorizeApp(self)
//self.etsyManager.authorizeApp(self)
} }
break break
@ -409,12 +415,12 @@ extension NetworksTableViewController: UITableViewDelegate {
//code to authorize network //code to authorize network
//this is the type of code desired to access the rest management classes //this is the type of code desired to access the rest management classes
/*
let tabBar = self.tabBarController let tabBar = self.tabBarController
(tabBar as? HomeViewController)?.fbGraphManager.authorizeApp(self) (tabBar as? HomeViewController)?.fbGraphManager.authorizeApp(self)
*/
self.fbGraphManager.authorizeApp(self)
//self.fbGraphManager.authorizeApp(self)
} }