Skip to content

Commit 54ad6df

Browse files
changed nav controller tutorial
1 parent 1a0b849 commit 54ad6df

File tree

1 file changed

+6
-33
lines changed

1 file changed

+6
-33
lines changed
Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import useBaseUrl from '@docusaurus/useBaseUrl';
22

3-
# Connecting a Root Navigation Controller in Swift Using Storyboard
3+
# Embedding a Root Navigation Controller in Swift Using Storyboard
44

55
By default, Capacitor apps are embedded in a `CAPBridgeViewController`. To utilize the "push" type for presenting portals, it is necessary to embed the app within a navigation controller.
66

@@ -23,22 +23,9 @@ By default, Capacitor apps are embedded in a `CAPBridgeViewController`. To utili
2323

2424
## Step 2: Add a Navigation Controller
2525

26-
1. Drag and drop a "Navigation Controller" from the Object Library onto the storyboard canvas.
26+
1. Select the Bridge View Controller and locate the Editor section in the menu bar.
2727

28-
<em
29-
style={{
30-
textAlign: 'center',
31-
display: 'block',
32-
}}
33-
>
34-
<img
35-
src={useBaseUrl('/img/super-capacitor/embed-nav-controller-tutorial/step-2.webp')}
36-
data-zoom-src={useBaseUrl('/img/super-capacitor/embed-nav-controller-tutorial/step-2.webp')}
37-
width="75%"
38-
/>
39-
</em>
40-
41-
2. The navigation controller will come with an attached view controller. Remove the attached view controller and add a root view controller seugue from the navigation controller to the bridge view controller.
28+
2. Select Editor -> Embed In -> Navigation Controller. This will embed the Bridge View Controller within a navigation controller, as well as set the navigation controller as the initial view controller.
4229

4330
<em
4431
style={{
@@ -47,29 +34,15 @@ By default, Capacitor apps are embedded in a `CAPBridgeViewController`. To utili
4734
}}
4835
>
4936
<img
50-
src={useBaseUrl('/img/super-capacitor/embed-nav-controller-tutorial/step-2-1.webp')}
51-
data-zoom-src={useBaseUrl('/img/super-capacitor/embed-nav-controller-tutorial/step-2-1.webp')}
37+
src={useBaseUrl('/img/super-capacitor/embed-nav-controller-tutorial/step-3.webp')}
38+
data-zoom-src={useBaseUrl('/img/super-capacitor/embed-nav-controller-tutorial/step-3.webp')}
5239
width="75%"
5340
/>
5441
</em>
5542

56-
## Step 3: Set the Initial View Controller
5743

58-
1. Set the navigation controller as the initial view controller.
5944

60-
<em
61-
style={{
62-
textAlign: 'center',
63-
display: 'block',
64-
}}
65-
>
66-
<img
67-
src={useBaseUrl('/img/super-capacitor/embed-nav-controller-tutorial/step-3.webp')}
68-
data-zoom-src={useBaseUrl('/img/super-capacitor/embed-nav-controller-tutorial/step-3.webp')}
69-
width="75%"
70-
/>
71-
</em>
7245

73-
## Step 4: Customize the Navigation Controller
46+
## Step 3: Customize the Navigation Controller
7447

7548
1. To remove the navigation bar, set "Top Bar" to "None" in the Simulated Metrics section of the navigation controller.

0 commit comments

Comments
 (0)