From the course: iOS Development Tips

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Apple watch and the context menu

Apple watch and the context menu

From the course: iOS Development Tips

Apple watch and the context menu

- [Instructor] Apple Watch context menus provide extra buttons for actions using a long press of the watch. In this lesson, I'll show you how to add menus to your Watch OS projects. In the starter project you can find on GitHub, open the Assets group in the WatchKit app. I added menu icons for you to this project. Let's look at two requirements and a variation for menu items. Like iOS bar icons, Watch OS menu icons only use the alpha channel for color. If you look on a background other than white, where I have white is transparent. Anywhere I have color is white. Alpha values of 100% will appear solid, and an alpha value of 0% will be the background color. Secondly, these must be a certain size. Your icon for the menu should be 45 pixels square for a 38 millimeter, and 53 pixels for a 42 millimeter. You can span that out to 70 pixels for a 38 millimeter, and 80 pixels for a 42 millimeter. Use this extra space for a background only. Go to the Watch app storyboard. Select Objects, type…

Contents