Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
iOS 10 Programming for Beginners

You're reading from   iOS 10 Programming for Beginners Explore the latest iOS 10 and Swift 3 features

Arrow left icon
Product type Paperback
Published in Dec 2016
Publisher Packt
ISBN-13 9781786464507
Length 678 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Craig Clayton Craig Clayton
Author Profile Icon Craig Clayton
Craig Clayton
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Getting Familiar with Xcode FREE CHAPTER 2. Building a Foundation with Swift 3. Digging Deeper 4. Digging into Collections 5. Starting the UI Setup 6. Setting Up UI 7. Getting Started with the Grid 8. Getting Started with the List 9. Working More with Lists 10. Where Are We? 11. Where's My Data? 12. Foodie Reviews 13. Saving Reviews 14. Universal 15. iMessages 16. Notifications 17. Just a Peek 18. Beta and Store Submission Index

Updating UI in Storyboard


Currently, if you hit Select a location in your simulator, a modal pops up. However, you cannot dismiss the modal without restarting the entire app. Therefore, we need a Cancel button and a Done button to dismiss the view. Let's work on this first:

  1. Open Explore.storyboard and select the segue that is connected to your Select a Location. It should now be highlighted.

  2. Then, go to your View Controller (not the Navigation Controller) of your modal:

  3. As you have done in previous chapters, type in bar button into the filter area of the Objects library in the Utilities panel.

  4. Drag and drop a Bar Button Item into the right area of the Navigation Bar of your View Controller Scene:

  5. Drag another Bar Button Item into the left area of the Navigation Bar:

  6. You should now have two Bar Button Items that both say Item:

Updating Bar Button Items

Next, we need to update both of the Bar Button Items to say Cancel and Done:

  1. Select the left Bar Button Item, and in the Utilities panel, select the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image