Skip to content

Commit 1894a64

Browse files
author
Gürhan Yerlikaya
committed
added navigationController for example project
1 parent b318fd8 commit 1894a64

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

Example/ScrollableStackView/Base.lproj/Main.storyboard

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16C67" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="iyO-1W-12E">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16C67" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="bXc-Pm-PMg">
33
<device id="retina5_5" orientation="portrait">
44
<adaptation id="fullscreen"/>
55
</device>
@@ -13,15 +13,15 @@
1313
<objects>
1414
<tableViewController id="iyO-1W-12E" customClass="ExampleViewController" customModule="ScrollableStackView_Example" customModuleProvider="target" sceneMemberID="viewController">
1515
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="eZe-G7-ypE">
16-
<rect key="frame" x="0.0" y="64" width="414" height="672"/>
16+
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
1717
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
1818
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
1919
<prototypes>
2020
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="bUr-eS-XDZ">
2121
<rect key="frame" x="0.0" y="28" width="414" height="44"/>
2222
<autoresizingMask key="autoresizingMask"/>
2323
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="bUr-eS-XDZ" id="R13-Wp-JUw">
24-
<rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
24+
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
2525
<autoresizingMask key="autoresizingMask"/>
2626
</tableViewCellContentView>
2727
</tableViewCell>
@@ -31,14 +31,12 @@
3131
<outlet property="delegate" destination="iyO-1W-12E" id="IuM-Ka-XYW"/>
3232
</connections>
3333
</tableView>
34-
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" translucent="NO" prompted="NO"/>
35-
<refreshControl key="refreshControl" opaque="NO" multipleTouchEnabled="YES" contentMode="center" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" id="WPM-Qd-TGu">
36-
<autoresizingMask key="autoresizingMask"/>
37-
</refreshControl>
34+
<navigationItem key="navigationItem" id="tr1-NJ-sxR"/>
35+
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
3836
</tableViewController>
3937
<placeholder placeholderIdentifier="IBFirstResponder" id="d3v-rG-j6g" userLabel="First Responder" sceneMemberID="firstResponder"/>
4038
</objects>
41-
<point key="canvasLocation" x="-1483" y="-55"/>
39+
<point key="canvasLocation" x="-576.81159420289862" y="-55.434782608695656"/>
4240
</scene>
4341
<!--Vertical Layout View Controller-->
4442
<scene sceneID="qhS-Y9-vB6">
@@ -53,10 +51,29 @@
5351
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
5452
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
5553
</view>
54+
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
5655
</viewController>
5756
<placeholder placeholderIdentifier="IBFirstResponder" id="x2W-aS-xJR" userLabel="First Responder" sceneMemberID="firstResponder"/>
5857
</objects>
59-
<point key="canvasLocation" x="-820" y="-53"/>
58+
<point key="canvasLocation" x="-577" y="624"/>
59+
</scene>
60+
<!--Navigation Controller-->
61+
<scene sceneID="dbw-aw-ut5">
62+
<objects>
63+
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="bXc-Pm-PMg" sceneMemberID="viewController">
64+
<toolbarItems/>
65+
<navigationBar key="navigationBar" contentMode="scaleToFill" id="v1k-PZ-lhd">
66+
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
67+
<autoresizingMask key="autoresizingMask"/>
68+
</navigationBar>
69+
<nil name="viewControllers"/>
70+
<connections>
71+
<segue destination="iyO-1W-12E" kind="relationship" relationship="rootViewController" id="1dH-T8-WwL"/>
72+
</connections>
73+
</navigationController>
74+
<placeholder placeholderIdentifier="IBFirstResponder" id="tXT-pt-pJc" userLabel="First Responder" sceneMemberID="firstResponder"/>
75+
</objects>
76+
<point key="canvasLocation" x="-1484.057971014493" y="-55.434782608695656"/>
6077
</scene>
6178
</scenes>
6279
</document>

Example/ScrollableStackView/ExampleViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class ExampleViewController: UITableViewController {
3737
if indexPath.row == 0 {
3838
let storyboard = UIStoryboard(name: "Main", bundle: nil)
3939
let controller = storyboard.instantiateViewController(withIdentifier: "VerticalLayoutViewController") as! VerticalLayoutViewController
40-
self.present(controller, animated: true, completion: nil)
40+
self.navigationController?.pushViewController(controller, animated: true)
4141
}
4242
// } else if indexPath.row == 1 {
4343
// let storyboard = UIStoryboard(name: "Main", bundle: nil)

0 commit comments

Comments
 (0)