Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Introduction to Scroll Views with Swift 2 Paged Scrolling Custom Views for Pages

Mercedes Smith
PLUS
Mercedes Smith
Courses Plus Student 77 Points

How would I go about adding an additional view such as the treehouse app where there is a Login screen with a button?

Basically I would like to add an additional screen at the end of this page control to let a user Login( The intro to this course showed the last screen) Thanks!

2 Answers

Robert Bojor
PLUS
Robert Bojor
Courses Plus Student 29,439 Points

Judging by the way Amid set the dictionary which drives the views to load ( image names and titles ) you can actually add something else to that dictionary, something like nibName and have the PageView class load a different nib when you want to display the login page.

Mercedes Smith
Mercedes Smith
Courses Plus Student 77 Points

Thanks for the reply! Can you share some sample code explaining how to load the new Nib at the end? I tried multiple times but couldn't get it! I was able to just add an additional nib of the same type like he has it now. Thank you!

Robert Bojor
PLUS
Robert Bojor
Courses Plus Student 29,439 Points

Hey, don't have anything written down at the moment, that was just an idea based on the course video. Will try to get something down one of these days and will get back to you.