Commit 7ac414d4 by Dima Bart

Update to use app ID, improve container view switching.

parent ec9ab07a
...@@ -28,6 +28,9 @@ import UIKit ...@@ -28,6 +28,9 @@ import UIKit
class AccountViewController: UIViewController { class AccountViewController: UIViewController {
@IBOutlet weak var loginContainerView: UIView!
@IBOutlet weak var signupContainerView: UIView!
private var loginViewController: LoginViewController! private var loginViewController: LoginViewController!
private var signupViewController: SignupViewController! private var signupViewController: SignupViewController!
...@@ -64,8 +67,8 @@ class AccountViewController: UIViewController { ...@@ -64,8 +67,8 @@ class AccountViewController: UIViewController {
// MARK: - Updates - // MARK: - Updates -
// //
private func updateSelectedIndex(index: Int) { private func updateSelectedIndex(index: Int) {
self.loginViewController.view.hidden = (index != 0) self.loginContainerView.hidden = (index != 0)
self.signupViewController.view.hidden = (index == 0) self.signupContainerView.hidden = (index == 0)
} }
// ---------------------------------- // ----------------------------------
......
...@@ -47,7 +47,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -47,7 +47,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// //
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
self.client = BUYClient(shopDomain: self.shopDomain, apiKey: self.apiKey, channelId: self.channedID) self.client = BUYClient(shopDomain: self.shopDomain, apiKey: self.apiKey, appId: self.appID)
return true return true
} }
......
...@@ -75,6 +75,10 @@ ...@@ -75,6 +75,10 @@
</connections> </connections>
</segmentedControl> </segmentedControl>
</navigationItem> </navigationItem>
<connections>
<outlet property="loginContainerView" destination="KZD-y5-2e3" id="g1r-NW-TfQ"/>
<outlet property="signupContainerView" destination="ZAC-pf-9Yj" id="GGw-ff-lV9"/>
</connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="twZ-kb-vHr" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="twZ-kb-vHr" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
...@@ -265,12 +269,44 @@ ...@@ -265,12 +269,44 @@
</variation> </variation>
</tableViewCellContentView> </tableViewCellContentView>
</tableViewCell> </tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="WZx-ob-4he">
<rect key="frame" x="0.0" y="123" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="WZx-ob-4he" id="m2b-6M-mwt">
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Password" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="kkr-5N-h4x">
<rect key="frame" x="15" y="12" width="570" height="20"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<textInputTraits key="textInputTraits"/>
</textField>
</subviews>
<constraints>
<constraint firstAttribute="bottomMargin" secondItem="kkr-5N-h4x" secondAttribute="bottom" id="4LO-ro-Pti"/>
<constraint firstItem="kkr-5N-h4x" firstAttribute="leading" secondItem="m2b-6M-mwt" secondAttribute="leadingMargin" constant="15" id="FWQ-QU-fMw"/>
<constraint firstItem="kkr-5N-h4x" firstAttribute="top" secondItem="m2b-6M-mwt" secondAttribute="topMargin" id="Hrj-zw-AbS"/>
<constraint firstAttribute="trailing" secondItem="kkr-5N-h4x" secondAttribute="trailing" constant="15" id="Pu2-VK-LWY"/>
<constraint firstItem="kkr-5N-h4x" firstAttribute="leading" secondItem="m2b-6M-mwt" secondAttribute="leading" constant="15" id="ePW-gB-2WY"/>
<constraint firstAttribute="trailingMargin" secondItem="kkr-5N-h4x" secondAttribute="trailing" constant="15" id="r6Z-0o-7LZ"/>
<constraint firstItem="kkr-5N-h4x" firstAttribute="centerY" secondItem="m2b-6M-mwt" secondAttribute="centerY" id="uTV-eb-CEs"/>
</constraints>
<variation key="default">
<mask key="constraints">
<exclude reference="4LO-ro-Pti"/>
<exclude reference="r6Z-0o-7LZ"/>
<exclude reference="FWQ-QU-fMw"/>
<exclude reference="Hrj-zw-AbS"/>
</mask>
</variation>
</tableViewCellContentView>
</tableViewCell>
</cells> </cells>
</tableViewSection> </tableViewSection>
<tableViewSection id="XYD-jG-PaH"> <tableViewSection id="XYD-jG-PaH">
<cells> <cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="0w1-5E-3cV" style="IBUITableViewCellStyleDefault" id="81f-nB-Sh2"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="0w1-5E-3cV" style="IBUITableViewCellStyleDefault" id="81f-nB-Sh2">
<rect key="frame" x="0.0" y="159" width="600" height="44"/> <rect key="frame" x="0.0" y="203" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="81f-nB-Sh2" id="Mls-GG-NsX"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="81f-nB-Sh2" id="Mls-GG-NsX">
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/> <rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment