Tag: WatchOS
-
Introducing Core Motion: Make A Pedometer
Apple packed a lot of sensors into the small packages that are iOS devices. You as a developer can detect movement in three dimensions, acceleration, rotations, and impact and use those in your applications. All of this brought to your application in the CoreMotion framework. CoreMotion has many uses. Game developers use it to make a phone into…
-
Why do we need Delegates in iOS and WatchOS?
About two years ago someone asked me a very good question: Why do we need delegates for UIViewControllers? He thought Swift made things easier, but this delegate stuff seems very complicated. Shouldn’t we be able to send a message or initializer between classes? When I first learned iOS, I’ll admit it took me months to…
-
Tables and Scroll Views in WatchOS2
One of the most powerful and important controls on both wearable and mobile devices are table views. Table views come in two flavors: static and dynamic. Dynamic table views read data from a collection type and displays it. Static tables allow for a vertical scroll view with a set of controls. Static table views are…
-
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,…
-
Swift WatchKit: Selecting With Multiple Rows in Apple Watch
In the last lesson we created a multi-row table. However, we can only view the table, not select from the table. Multi-row tables provide some challenges with selection. Along the way, we’ll make a new interface to display selected information, using a technique we have not yet covered in this series: A dictionary as a…
-
The Beta Blues with the Apple Watch
In case you did not hear about the WWDC15 keynote, Apple announced that WatchKit is now part of WatchOS2, implemented in the Xcode 7 beta. WatchOS2 has several major differences to WatchKit, most importantly native execution of apps on the watch. For the watchkit lessons I’ve been posting, I’m assuming watchkit 1, and will not…