guard let firstDay = [LambdaSchoolDays]().first
Table of Contents
The first day
The first day was quite exciting! The only issue I had was that the lecture lasted a bit long. To be fair, they decided to make a few changes to the curriculum and this is the largest iOS cohort they’ve had so far. I still had a lot of fun and learned about storyboard references!
Storyboard reference
A storyboard reference is where you design your interface in different storyboard files, but then create segues to view controllers in other storyboards. This is particularly useful for larger projects as Interface Builder isn’t exactly known for its efficiency and stability, especially when dealing with larger files. It ended up being much simpler than I had anticipated.
Code Example
- Start by creating a new storyboard (I’m just calling mine Storyboard2.storyboard for this demo) and either creating or copying an existing view controller to it.
- It is crucial that you set the initial view controller setting on the second storyboard
- In the main storyboard, add a
Storyboard Reference
object
- With the reference selected, you can choose which storyboard you wish to reference
- Finally, treat the storyboard reference as if it’s any other view controller in your storyboard!
-
- And here’s the finished product (I skipped showing how to embed in a nav controller, btw)
-
Demo Project Link
If you’d like to see the demo project for yourself, you can get it here.
Table of Contents
The first day
The first day was quite exciting! The only issue I had was that the lecture lasted a bit long. To be fair, they decided to make a few changes to the curriculum and this is the largest iOS cohort they’ve had so far. I still had a lot of fun and learned about storyboard references!
Storyboard reference
A storyboard reference is where you design your interface in different storyboard files, but then create segues to view controllers in other storyboards. This is particularly useful for larger projects as Interface Builder isn’t exactly known for its efficiency and stability, especially when dealing with larger files. It ended up being much simpler than I had anticipated.
Code Example
- Start by creating a new storyboard (I’m just calling mine Storyboard2.storyboard for this demo) and either creating or copying an existing view controller to it.
- It is crucial that you set the initial view controller setting on the second storyboard
- In the main storyboard, add a
Storyboard Reference
object - With the reference selected, you can choose which storyboard you wish to reference
- Finally, treat the storyboard reference as if it’s any other view controller in your storyboard!
- And here’s the finished product (I skipped showing how to embed in a nav controller, btw)
Demo Project Link
If you’d like to see the demo project for yourself, you can get it here.