The Settings Bundle
You’ll often want default settings that users can change. iOS provides the settings bundle for storing this information. Let’s look at how to use the settings bundle. Download the starter example file. I created a project which eventually will display the user’s default pizza. We’ll finish the code to add that pizza. To add a…
Add Provisional Permissions for Notifications
If you’ve worked with notifications before, you’ve probably dealt with user permissions. IN iOS 12, there’s a new type of user notification permission to handle a situation that happens often, which is super easy to add to already existent code. Download the exercise file and you’ll find a project I adapted from chapter three of my…
Changes to Xcode 10 Storyboards.
There’s been some great changes to playgrounds in Xcode 10 that will make your code even easier to prototype than ever before. Let’s take a look at some of the changes. In Xcode 10 open a new single view playground, and save it as Xcode10Playground. If you are familiar with the Xcode 9 playground single…
Use Code Snippets
An often neglected feature of Xcode is code snippets. Code snippets are quick ways to add code you frequently use. In Xcode 10 there were some major changes to code snippets, which might confuse those who use them now, but make them even easier to use. Let’s take a look at this cool feature. I’m using…
Animate With a Map Camera
In an earlier tip, I showed you how to make a map in iPad Playgrounds. Let’s learn how to animate those maps, doing a flyover of Michigan avenue in Chicago from The former home of Chess Records at 2120 South Michigan Avenue (immortalized in the Rolling Stones song) and past Grant park to North Avenue…
Timer Accuracy in iOS
It’s buried in the docs, so you might not know how inaccurate Timer objects can be if you are trying to show the time. Let’s look at that inaccuracy and how to work around it. You’ll find in the exercise file on GitHub a starter project where I’ve put together a demo app with three…
Tips: Time Zones and Date Components
Learn how to set dates, times and time zones in iOS using the DateComponent Object. Learn an easy way to make a valid DateComponent.
Date and Time in iOS
The song says time is on my side, but I sometimes I wonder about that when trying to work with the time types in iOS. Let me show you some of the time types. In Xcode, Open up a blank playground. There are two primary types for working with time: TimeInterval and Date. Add this…