diff options
author | Vitaly Takmazov | 2018-04-01 23:03:29 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-04-01 23:03:29 +0300 |
commit | c623f12b2d5e95708a3971e642410c9098f71285 (patch) | |
tree | 795caed3887d28c3cf80fe10fe920a9d9f4268b5 /Juick | |
parent | 677397be225a3b34f4b26e573fd067f73f9eb75c (diff) |
fix navigation
Diffstat (limited to 'Juick')
-rw-r--r-- | Juick/Main.storyboard | 111 | ||||
-rw-r--r-- | Juick/Supporting Files/Juick-Info.plist | 2 | ||||
-rw-r--r-- | Juick/ViewControllers/DiscoverViewController.m | 2 | ||||
-rw-r--r-- | Juick/ViewControllers/LoginViewController.m | 4 |
4 files changed, 71 insertions, 48 deletions
diff --git a/Juick/Main.storyboard b/Juick/Main.storyboard index 8042f4b..0b2308a 100644 --- a/Juick/Main.storyboard +++ b/Juick/Main.storyboard @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="zgP-bN-c50"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="XnR-Hh-t65"> <device id="retina4_7" orientation="portrait"> <adaptation id="fullscreen"/> </device> @@ -10,26 +10,10 @@ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <scenes> - <!--Navigation Controller--> - <scene sceneID="PGG-a7-Z19"> - <objects> - <navigationController id="zgP-bN-c50" sceneMemberID="viewController"> - <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="B1R-tc-Ps2"> - <rect key="frame" x="0.0" y="20" width="375" height="44"/> - <autoresizingMask key="autoresizingMask"/> - </navigationBar> - <connections> - <segue destination="XnR-Hh-t65" kind="relationship" relationship="rootViewController" id="S6h-3C-cZ3"/> - </connections> - </navigationController> - <placeholder placeholderIdentifier="IBFirstResponder" id="u8u-do-Fxy" userLabel="First Responder" sceneMemberID="firstResponder"/> - </objects> - <point key="canvasLocation" x="-1667" y="-1060"/> - </scene> <!--Thread View Controller--> <scene sceneID="hRe-9n-wGd"> <objects> - <tableViewController id="egN-ti-sbh" customClass="ThreadViewController" sceneMemberID="viewController"> + <tableViewController hidesBottomBarWhenPushed="YES" id="egN-ti-sbh" customClass="ThreadViewController" sceneMemberID="viewController"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="R7I-ps-E4b"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> @@ -58,34 +42,35 @@ </objects> <point key="canvasLocation" x="-223" y="-1072"/> </scene> + <!--Item--> + <scene sceneID="NkO-CZ-YSO"> + <objects> + <navigationController id="k3X-uv-0IF" sceneMemberID="viewController"> + <tabBarItem key="tabBarItem" title="Item" id="Qml-qG-fK2"/> + <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="3ze-yo-W7s"> + <rect key="frame" x="0.0" y="20" width="375" height="44"/> + <autoresizingMask key="autoresizingMask"/> + </navigationBar> + <connections> + <segue destination="VCH-GK-jaH" kind="relationship" relationship="rootViewController" id="Rgn-In-COD"/> + <segue destination="J8f-Vc-5Bc" kind="modal" identifier="loginSegue" id="1y1-LA-eQL"/> + </connections> + </navigationController> + <placeholder placeholderIdentifier="IBFirstResponder" id="fVV-xR-99a" userLabel="First Responder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="-1160" y="-342"/> + </scene> <!--Discover--> <scene sceneID="uvH-u9-x7X"> <objects> - <tableViewController title="Discover" id="VCH-GK-jaH" customClass="DiscoverViewController" sceneMemberID="viewController"> + <tableViewController id="VCH-GK-jaH" customClass="DiscoverViewController" sceneMemberID="viewController"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="tbe-Zb-PfB"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> - <toolbar key="tableHeaderView" opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="Whi-G7-JTB"> - <rect key="frame" x="0.0" y="0.0" width="375" height="44"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> - <items> - <barButtonItem image="chats_icon" id="eaY-Yt-u9g"> - <connections> - <action selector="filterAction:" destination="VCH-GK-jaH" id="m3s-pS-GdV"/> - </connections> - </barButtonItem> - <barButtonItem style="plain" systemItem="flexibleSpace" id="JhF-fJ-DQL"/> - <barButtonItem systemItem="compose" id="ovc-xl-vHA"> - <connections> - <segue destination="rr1-jx-MLx" kind="push" id="vj1-M0-h6U"/> - </connections> - </barButtonItem> - </items> - </toolbar> <prototypes> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="prototypeMessage" id="Orz-mD-PnE"> - <rect key="frame" x="0.0" y="72" width="375" height="44"/> + <rect key="frame" x="0.0" y="28" width="375" height="44"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Orz-mD-PnE" id="WRd-ev-Osb"> <rect key="frame" x="0.0" y="0.0" width="341" height="43.5"/> @@ -104,9 +89,14 @@ <tabBarItem key="tabBarItem" title="Discover" image="nearby_icon" id="Je4-Zm-Zbu"/> <toolbarItems/> <navigationItem key="navigationItem" id="M2f-nV-K0C"> - <barButtonItem key="rightBarButtonItem" title="Item" image="settings_icon" style="plain" id="Sd1-hN-fdS"> + <barButtonItem key="leftBarButtonItem" image="chats_icon" id="eaY-Yt-u9g"> + <connections> + <action selector="filterAction:" destination="VCH-GK-jaH" id="m3s-pS-GdV"/> + </connections> + </barButtonItem> + <barButtonItem key="rightBarButtonItem" systemItem="compose" id="ovc-xl-vHA"> <connections> - <segue destination="4g9-hM-bzq" kind="push" identifier="loginSegue" id="6ha-6h-L0E"/> + <segue destination="rr1-jx-MLx" kind="push" id="vj1-M0-h6U"/> </connections> </barButtonItem> </navigationItem> @@ -115,6 +105,23 @@ </objects> <point key="canvasLocation" x="-671.5" y="-188.5"/> </scene> + <!--Navigation Controller--> + <scene sceneID="fTm-5S-xsb"> + <objects> + <navigationController id="J8f-Vc-5Bc" sceneMemberID="viewController"> + <navigationItem key="navigationItem" id="6ON-aU-Q8N"/> + <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="ePy-kG-WvK"> + <rect key="frame" x="0.0" y="20" width="375" height="44"/> + <autoresizingMask key="autoresizingMask"/> + </navigationBar> + <connections> + <segue destination="4g9-hM-bzq" kind="relationship" relationship="rootViewController" id="S9b-ol-Od0"/> + </connections> + </navigationController> + <placeholder placeholderIdentifier="IBFirstResponder" id="bm6-Os-xkH" userLabel="First Responder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="-1680" y="663"/> + </scene> <!--Login View Controller--> <scene sceneID="hlR-4j-yzx"> <objects> @@ -222,6 +229,23 @@ </objects> <point key="canvasLocation" x="-657.5" y="665.88833333333332"/> </scene> + <!--Item--> + <scene sceneID="slX-NB-ZJR"> + <objects> + <navigationController id="bqF-EV-jyA" sceneMemberID="viewController"> + <tabBarItem key="tabBarItem" title="Item" id="uDU-Ru-VA7"/> + <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="MLM-G7-sIv"> + <rect key="frame" x="0.0" y="20" width="375" height="44"/> + <autoresizingMask key="autoresizingMask"/> + </navigationBar> + <connections> + <segue destination="vqF-gx-pZG" kind="relationship" relationship="rootViewController" id="mX4-bY-xEX"/> + </connections> + </navigationController> + <placeholder placeholderIdentifier="IBFirstResponder" id="Naf-TD-SSX" userLabel="First Responder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="-223" y="666"/> + </scene> <!--Notifications--> <scene sceneID="CAp-HD-pIQ"> <objects> @@ -258,7 +282,7 @@ <!--New post--> <scene sceneID="bF2-U0-WHJ"> <objects> - <viewController title="New post" id="rr1-jx-MLx" customClass="NewPostViewController" sceneMemberID="viewController"> + <viewController title="New post" hidesBottomBarWhenPushed="YES" id="rr1-jx-MLx" customClass="NewPostViewController" sceneMemberID="viewController"> <view key="view" contentMode="scaleToFill" id="7ep-bO-aeZ"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> @@ -302,7 +326,7 @@ <!--Chat View Controller--> <scene sceneID="pvH-EU-EhQ"> <objects> - <tableViewController id="jVt-4s-14k" customClass="ChatViewController" sceneMemberID="viewController"> + <tableViewController hidesBottomBarWhenPushed="YES" id="jVt-4s-14k" customClass="ChatViewController" sceneMemberID="viewController"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="CGw-ia-Afb"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> @@ -339,8 +363,8 @@ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </tabBar> <connections> - <segue destination="VCH-GK-jaH" kind="relationship" relationship="viewControllers" id="tRL-5K-f5Z"/> - <segue destination="vqF-gx-pZG" kind="relationship" relationship="viewControllers" id="HL4-7U-gP6"/> + <segue destination="k3X-uv-0IF" kind="relationship" relationship="viewControllers" id="5rb-rf-WgC"/> + <segue destination="bqF-EV-jyA" kind="relationship" relationship="viewControllers" id="L49-RF-BJa"/> </connections> </tabBarController> <placeholder placeholderIdentifier="IBFirstResponder" id="AnM-ht-zf8" userLabel="First Responder" sceneMemberID="firstResponder"/> @@ -352,7 +376,6 @@ <image name="Splash.png" width="96" height="96"/> <image name="chats_icon" width="20" height="22"/> <image name="nearby_icon" width="20" height="20"/> - <image name="settings_icon" width="20" height="20"/> </resources> <inferredMetricsTieBreakers> <segue reference="vj1-M0-h6U"/> diff --git a/Juick/Supporting Files/Juick-Info.plist b/Juick/Supporting Files/Juick-Info.plist index c50b6d6..820c009 100644 --- a/Juick/Supporting Files/Juick-Info.plist +++ b/Juick/Supporting Files/Juick-Info.plist @@ -21,7 +21,7 @@ <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> - <string>47</string> + <string>48</string> <key>ITSAppUsesNonExemptEncryption</key> <false/> <key>LSApplicationCategoryType</key> diff --git a/Juick/ViewControllers/DiscoverViewController.m b/Juick/ViewControllers/DiscoverViewController.m index fde23ee..11010ae 100644 --- a/Juick/ViewControllers/DiscoverViewController.m +++ b/Juick/ViewControllers/DiscoverViewController.m @@ -75,7 +75,7 @@ AppDelegate *appDelegate; } - (IBAction)filterAction:(id)sender { if (![User isAuthenticated]) { - [self performSegueWithIdentifier:@"loginSegue" sender:self]; + [self.navigationController performSegueWithIdentifier:@"loginSegue" sender:self.navigationController]; return; } UIAlertController *filterAlert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet]; diff --git a/Juick/ViewControllers/LoginViewController.m b/Juick/ViewControllers/LoginViewController.m index fd3c2b0..917d563 100644 --- a/Juick/ViewControllers/LoginViewController.m +++ b/Juick/ViewControllers/LoginViewController.m @@ -52,7 +52,7 @@ transition.subtype = kCATransitionFromTop; [self.navigationController.view.layer addAnimation:transition forKey:kCATransition]; - [self.navigationController popViewControllerAnimated:NO]; + [self.navigationController dismissViewControllerAnimated:NO completion:nil]; } - (void) doneSignIn { @@ -68,7 +68,7 @@ transition.subtype = kCATransitionFromTop; [self.navigationController.view.layer addAnimation:transition forKey:kCATransition]; - [self.navigationController popToRootViewControllerAnimated:NO]; + [self.navigationController dismissViewControllerAnimated:NO completion:nil]; } else { [User throwUnableToLogin:self]; } |