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
Conferences
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

Custom UI in notifications

In order to add custom UI to our notifications, we need to add an extension. Let's get started by doing the following:

  1. In the Navigator panel, select the Project navigator and, then, your project.
  2. At the bottom of the Targets area, click on the + button.
  3. Select Notification Content Extension under Application Extension and, then, click on Next:
    Custom UI in notifications
  4. In the options screen that appears, set Product Name to LetsEatContentExtension and click on Finish:
    Custom UI in notifications
  5. Next, select Activate in the screen that appears:
    Custom UI in notifications
  6. This activation will allow us to build and run our custom UI extension in the simulator. Now, you have a choice of running our app, the iMessages app, our kit, or our custom UI extension.

Now that our extension is created, we need to be able to use it.

  1. Open the info.plist file in our LetsEatContentExtension folder.
  2. Tap the NSExtension disclosure arrow to open up that key.
  3. Then, tap the disclosure arrow to open NSExtensionAttributes, under which you will see UNNotificationExtensionCategory...
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