Swift Around the Web
Swift: Don’t do that
A great list of tips / reminders for writing nice Swift code. Here are some of my favorites:
- Don’t use classes when structs will do
- Do use optionals. Use them well. Love them. Embrace the nil and the if let.
- Don’t use CGPointMake(). Prefer Swift constructors and initializers over legacy ones.
- Use TitleCase for types and enum variants.
- Don’t forget access controls
Sorting an Array of Dictionaries
I loved reading through the thought process in this post of someone who's used to doing something in Objective-C and decides to do the same thing in Swift, but keeps an open mind to take advantage of Swift.
Coding
Demystifying Retain Cycles in ARC
"Retain cycles are a obscure topic for iOS developers. There are lot of misinformation in the web, to the point of people giving wrong suggestions and “fixes” that could even potentially lead to problems and crashes in your App. In this article, I would like to shed some light on the subject matter."
For more reading on the topic, also check out @andrewcbancroft's blog post: Strong, Weak, and Unowned – Sorting out ARC and Swift.
Graduation
Amazing look at how to refactor code well by maximizing on these two values:
- Short methods are better than long methods
- Methods with fewer parameters are better than methods with more parameters.
Apple News
Designing for Apple Watch
Check out the new and shiny updated Apple Watch Human Interface Guidelines. Must read if you're even remotely thinking of making an Apple Watch app, glance, and / or notification.
A good reminder here: "The best apps support fast, frequent interactions and focus on the content that people care about the most."
Design
NO INTERFACE
We're getting a lot closer to the world in Her...
"Truly natural, intuitive interaction with technology has always been the dream. That is, interaction so natural, so human, that it needs NO INTERFACE.
So what's different now? In 2016 NO INTERFACE will finally become a reality, thanks to the powerful convergence of primed user expectation and new technologies that are both fueling and serving the need for more natural interactions with tech."
Redesigning Overcast’s Apple Watch app
Great overview of the issues that come with building an Apple Watch app and how to adapt.
"Trying to match the structure of the iOS app was a mistake. For most types of apps, the Apple Watch today is best thought of not as a platform to port your app to, but a simple remote control or viewport into your iPhone app."
Other Cool Stuff
Adventures in Japanese UI Design: Railway Information Systems
When I visited Japan earlier this year, I was surprised that I had absolutely no issues quickly understanding and using their Railway system. I took trains as my main transportation like a pro. Meanwhile, I remember when I tried to take a train in New York last year - a helpful stranger told me to take the train one station the wrong way because it would be easier to cross to the other side in a different station than the one I was in... This article explores the cool Japanese railway information UI design and what makes it so intuitive.
Tutorials
Implementing the Periscope App Pull-to-refresh control
"In this tutorial I’m going to implement the “Pull To Refresh” control created for the iPhone app Periscope. It’s something new that caught my attention, so I thought I’d “disassemble” their layout trying to create something similar."
Videos
Animating Apple Watch Activity Rings in PaintCode
"This video demonstrates how to draw the Apple Watch activity rings in PaintCode. With variables, it is even easy to make the activity rings parametric."
Road Trip DJ
Follow along as @subdigital builds a full app, Road Trip DJ. The first three parts are free: Part 1, Part 2, Part 3. Subscribers can find the full 12 Parts on the NSScreencast homepage.
Functional Voodoo
Object Oriented Functional Programming
Note: This takes a while to load (hello iCloud!), so have patience - the wait is worth it! These are slides from @casademora's NSMeetup Talk that I had the pleasure of attending. Unfortunately, the talk was not recorded (I'd watch it again if it were!), but the slides are still very helpful. The fun begins on slide 30!
WATCH
WatchKit Controller Life Cycle
"When multiple page-based interface controllers are loaded (whether they’re the root interfaces or they’ve been presented modally), init and awakeWithContext: are called on all controllers before willActivate is called on the first page. This means that you can improve the apparent responsiveness of your app by doing as little work as necessary in these two methods. As it’s a common question, be aware that awakeWithContext: will not be called again."
Creating a Number Keypad for Apple Watch
I really like the idea of using the digital crown for a lot of the number-type input on the Apple Watch, like it's done in the Time setting. I'd love to see this done creatively for a calculator app. But we don't have the API for that yet and there are definitely a lot of important use-cases for having a number keypad (including Apple's own passcode screen on the Apple Watch). This is a very detailed WatchKit walk-though of everything from using groups, configuring layout, and writing the code.
Podcasts
Episode 14: Damn You UPS!
@bgilham of @WatchKitSources and @FiveMinWatchKit talks about WatchKit development and more.
Swift Code
Starburst - A collection of animated loading sequences for Apple Watch
DBPathRecognizer - Handwriting recognition in Swift
KFSwiftImageLoader - An extremely high-performance, lightweight, and energy-efficient pure Swift async web image loader with memory and disk caching for iOS and  Watch.
HealthKitHeartRateExporter - A simple sample application for exporting heart rate samples from HealthKit.
SwiftCharts - Layers based charts library for iOS
Business
Swift Thoughts
WWDC is officially less than a month away! Even if you didn't get the ticket, I highly recommend attending AltConf (FREE!) and there will be lots and lots of parties, which you can monitor as they start getting posted by WWDC Parties (iOS / WatchKit app here).
If you were lucky to get a ticket but haven't attended before, I wrote up some survival tips from my experience last year. Hope to see you there!