S Link
Senior iOS Engineer at Timehop
Timehop is looking for a senior iOS engineer to help us build the future of the past for millions of users.
Get Live 1:1 Swift Expert Help / Become a Swift Codementor
Codementor helps developers learn Swift faster with on-demand live expert help via screen sharing, video and chat. Are you an iOS expert? Become a Codementor and get paid by helping your fellow developers.
Swift Around the Web
Advanced & Practical Enum usage in Swift
A super comprehensive list of use-cases for enums that make a lot of sense in Swift, but you probably haven't thought of! Must read!
Swift: Using Local Closures
I like the idea of creating a quick local closure in a method as you're writing it, and then extracting it as needed into a private function after it's flushed out.
Coding
The Plum-O-Meter: Weighing Plums Using 3D Touch in Swift
Definitely would never have come up with weighing plums as an amazing use-case for 3D touch, but maybe that's because I'm not living it up right:
"Here at FlexMonkey Towers, the ever beautiful Mrs FlexMonkey and I love to spend our Sunday mornings luxuriating in bed drinking Mimosas, listening to The Archers omnibus and eating some lovely plums. Being a generous sort of chap, whenever I pull a pair of plums from the freshly delivered Fortnum & Mason's hamper, I always try to ensure she has the larger of the two. However, this isn't always easy, especially after the third of fourth breakfast cocktail."
Lol. Great lesson on how great ideas could come from the simplest life experiences. 🍾
Mocks in Swift via Protocols
When I first learned that in Swift, I should be using value types whenever possible, I was excited. But as someone new to value types, I ran into a problem - whenever I tried to test my structs, I ended up "needing" to subclass, so I would go back defeated and make my value type a class. It's only after this year's WWDC that I realized how to avoid subclassing. Protocols!
This is a great walk-through of how to use protocol-oriented programming specifically in testing, with a side-effect of making your code a lot better of course! For another example of this, make sure to also check out @joemasilotti's post: Better Unit Testing with Swift.
Apple News
Xcode 7.1 GM Now Available
I have to agree with @terhechte that this is my favorite Swift 2.1 change: Expressions interpolated in strings may now contain string literals. Example "I am \(attributes["name"]!)"
is now valid! Oh, and storyboards now support 3D Touch 🎉.
Unfortunately, the emoji mapping on the Apple Watch is still messed up and there is a bug that requires FRAMEWORKS to share the same version number as the app in their plist - both Carthage and Cocoapods are working on a bandaid for this 😢.
Design
Optimistic Models 2 : Handling Multiple Interactions Without Server Confirmation
Great post on how to make your client-side user experience super smooth, a lot less annoying, and fast by moving some parts of server logic on the client side.
"When an operation is performed on the object, we add this operation to the list of unconfirmed operations, and recalculate the current object state. Once the operation succeeds, we should update the confirmed object and remove the finished operation from the list, and then recalculate the state again. If the operation fails, we just need to remove this operation from the list and recalculate the visible state."
UIDynamics, UIKit or OpenGL? 3 Types of iOS Animations For the Star Wars
"Have you ever thought that George Lucas’ epic space opera can, in fact, be implemented on iOS? We got inspired by the everlasting battle between the dark and light sides that bind the galaxy together and build our fantastic UI animation that features the Star Wars’ characters."
Source code on Github here
Other Cool Stuff
BabelStone: What's new in Unicode 7.0 ?
Finally, an explanation of the 🕴 emoji! Of course I still think a yoga emotion would have been a much better fit for the sports section than this one...
In Case You Missed It
WatchConnectivity: Sharing All Data via User Info
For this tutorial, I walk through building an Apple Watch food emoji communication app because food and emoji! I LOVE 🍦!
NSSpain 2015 Round Table: While Your App Was Sleeping
Round Table from NSSpain about background downloading and fetching for your iOS and Apple Watch apps moderated by @micheletitolo with @purpleyay, @NeoNacho, and me 🍷!
Videos
GameplayKit: Beyond Games, with Sash Zats
I've never looked into GameplayKit because I'm not a game developer. Amazing talk by @zats about how my default dismissal of anything game-development-related (and other iOS APIs I don't typically use) is completely wrong. By experimenting with GemeplayKit, @zats was able to come up with a really cool and relevant application of GameplayKit in a typical iOS app - a very fun and interactive app tutorial!
Emerging Best Practices
"Learning is not just for when Xcode is in beta."
AMAZING must-watch talk by @ashfurrow!!!! Great points about always learning, experimenting, always discovering new best practices, and of course lots of really amazing Swift tips! I honestly want to quote everything from this talk... so instead check out the slides here.
WATCH
Designing for the Apple Watch
"Apple Watch doesn’t (or at least shouldn’t) invite you in for further exploration. When it’s meaningful, it’s active. It senses what you’re doing, shows you a targeted bit of meaningful information, and gets out of the way. It’s about highly contextual cues to inform and enrich what you’re doing in real life — right here, right now. And that’s a fundamentally healthier place for mobile technology...
If you can describe the features you’re designing but not the moments you’re designing for, you have more work to do."
Swift Code
- LiveGIFs - Export your Live Photos as animated GIFs.
- LoveLiver - Create Apple's Live Photos from JPEG and MOV.
- LeetCode-Solutions-in-Swift - Get prepared for your next iOS job interview by studying high quality LeetCode solutions in Swift 2.1.
- simple-touch - Very simple swift wrapper for Biometric Authentication Services (Touch ID) on iOS.
- Instructions - Create walkthroughs and coach mark tours in a simple way.
Learning
How To Sharpen Your Software Developer Tools
Important to remember as we get lost in the urgency of everyday tasks and don't put aside time to become better with our tools and skills in general:
"This is a marathon not a sprint. An important thing to realize is that you are going to be writing code for a very long time, and that that's why a lot of little improvements becomes relevant."