Category: Swift
-
How to Use MapKit for 2D and 3D Map Views.
Everyone may remember when Apple first introduced MapKit to replace Google Maps on iPhones, they ended up to apologizing. However over time, developers have found how easy it is to use MapKit. This API provides features which make using both 2D and 3D maps very easy. More importantly, Google charges for map views over a…
-
The Step by Step Guide to Custom Presentation Controllers
Ever wanted that sliding sidebar or an alert with a image picker? Apple has many great ways of presenting view controllers, but sometimes we want something different, something new. For that we subclass UIPresentationController. However there’s a few concepts that you’ll need to wrap your head around first. In this lesson we’ll create a few…
-
Using Settings Bundles with Swift
Have you ever wondered how to put user defined settings for your app into the settings app? Xcode can create a special property list called a settings bundle which can append the NSUserDefaults with more entries from Settings App. You’ll find out in this lesson how to set up a settings bundle in your app…
-
How to Use NSUserDefaults in Swift.
While Property Lists can be ways of storing data, there is a better way of handling small amounts of data for preferences and settings that might change over time and user. While built on a property list, NSUSerDefaults Makes for a more convenient way for such data. IN this lesson, we’ll introduce NSUserDefaults and a…
-
How to Use Watch Timers and NSTimers in WatchOS2 and Swift
There’s a legacy from WatchOS1 which is not only frustrating but deceptive. While one would think that a watch would have easy to use built in timers, that is far from the case. WatchOS2 changed this situation slightly, but still makes timekeeping not as easy as one would think. There is a timer in WatchKit,…
-
How and Why To Use Unsigned Integers (UInt)
In the beginning there was the unsigned integer, and it was good. If you go deep into machine code you will still find that any device is nothing more than unsigned integers. All other values Int, Float, Bool, Character, and String are forms or collections of unsigned integers. To a modern high-level language like Swift,…