S Link
Mobile Makers – Learn Swift in San Francisco
Get your career started as a mobile app developer in our 8-week iOS Bootcamp. Beginners welcome. Apply by October 3rd, begin in October in San Francisco.
Swift Around the Web
Changes to the Swift Standard Library in 1.1 beta 2
As usual, @AirspeedVelocity does a great overview of the latest changes in the Swift Standard Library. Not many changes there... "Presumably we’re gearing up for a new GM alongside Yosemite, as there are almost no changes to the standard library in this release, much like when the GM was almost upon us for 6.0. Not surprising, since the Swift team had already confirmed on the dev forums that 6.1 was going to be a fairly small release."
How to instantiate class and init from string in Swift?
As an Objective-C developer, I love using NSStringFromClass to match my TableViewCell Identifiers to my TableViewCell classes. In Swift, however, I've found myself just using string cell identifiers, which I'm really not a fan of. Rob Napier recommends one solution to this - just create a mapping! Additional discussion on Twitter here.
Swift: The difference between a closure and an @autoclosure (Xcode 6 GM)
This is a great bite-size explanation of closures and @autoclosures in Swift, with great code samples included. I've used closures, but didn't even know about @autoclosures! They look useful, especially for writing nice and readable code in some cases.
Image Resizing Techniques
@NSHipster walks through several techniques for resizing images in Swift. Performance benchmarks are included!
Swifty methods
@radexp compares Objective-C and Swift when it comes to naming methods and using parameter names.
Coding
iOS 8 is officially out for consumers!! Yes, we all had to delete our selfies to make room for it, but iOS 8!!
Swift iOS Version Checking
If you're not ready to go all in on iOS 8, make sure to check out Andrew Bancroft's elegant post on how to keep your iOS versioning clear in your Swift code - so you can focus on adding iOS 8 only features to get your iOS 7 users excited to upgrade :)
PHImageManager
@NSHipster explains how to use the PHImageManager from the new Photos framework in iOS 8. "PHImageManager acts as a centralized coordinator for image assets. Previously, each app was responsible for creating and caching their own image thumbnails. In addition to requiring extra work on the part of developers, redundant image caches could potentially add up to gigabytes of data across the system. But with PHImageManager, apps don't have to worry about resizing or caching logistics, and can instead focus on building out features."
Core Data Asynchronous Fetching in iOS 8 and Swift
It's finally here - one of the most exciting Core Data Features in iOS 8 is the ability to perform asynchronous fetches. "An asynchronous fetch allows developers to execute a fetch request without blocking the Managed Object Context for the duration of the fetch. As an extra feature, the asynchronous fetch is cancelable by the user and provides progress reporting through NSProgress."
Adaptive UI in iOS 8: Explained
Need to explain Adaptive UI to designers and business people? Send them this article!
Apple News
Swift 1.1 is out!!! Of course, it is part of Xcode 6.1 beta 2, so it cannot be used in production just yet, but hopefully very soon. As I use enums relatively often in my Swift code, I'm excited that fromRaw(RawValue) static method has been replaced with an initializer init?(rawValue: RawValue), and the toRaw() method has been replaced with a rawValue property. Here is an example of how you would use enums going forward:
enum Foo: Int { case A = 0, B = 1, C = 2 }
let foo = Foo(rawValue: 2)! // formerly 'Foo.fromRaw(2)!’
println(foo.rawValue) // formerly 'foo.toRaw()'
Other Cool Stuff
The iPhones 6
"My understanding, talking to people at the event last week, is that Apple’s industrial design team mocked up prototypes of every single size between 4.0 and 6.0 inches, in tenths-of-an-inch increments, and from those 20 sizes selected the two that best hit the sweet spots for “regular iPhone” and “ginormous iPhone”. We might never see new iPhone sizes again — or at least not bigger ones." - Thanks Jared Sinclair for pointing this out!
In Case You Missed It
And back to blogging on NatashaTheRobot this week! Enjoy in case you missed these :)
Swift: Using MVVM To Work With Optionals
I’ve recently started using the Model-View-ViewModel pattern a lot more to structure my iOS application code. While MVVM is not necessary in all cases, I’ve found it to be especially useful when writing iOS applications in Swift aka working with Optionals.
Don’t Miss These Navigation Bar Interactions in iOS8
Have you noticed how nicely the mobile Safari navigation bar condenses on scroll, and how the tab bar disappears? Here are the new navigation bar interactions in iOS8.
iOS: How to Change UITableViewCell’s Selection Color App Wide
As part of your app branding, you might want to use a different selection color for all your tableViewCells! Here is how you can easily do this...
Tutorials
Introducing the iOS 8 Feast!
Timed with the release of iOS 8, Ray Wenderlich has released the official iOS 8 Feast. Lots of great tutorials and resources to get your started with iOS 8 development. Enjoy and be merry!
TRANSITIONS IN SWIFT (PART III)
Learn how to make fun interactive transitions in this great three-part tutorial series by Mathew Sanders. Also check out the earlier parts of this tutorial if you haven't already:
WATCH
As I keep thinking about the WATCH, I find the tactile interaction aspect of the watch to be the most exciting... and creepy.
A New Future?
The Exciting: "This is going to sound funny, but I think the tactile pulsing feature of the Apple Watch is one of its most intriguing. It got me thinking about how, paired with the right software, it could be a fantastic way to teach a wearer certain timing-related skills."
Permission to Touch
The Creepy: "All the tech giants want to touch your body. The end game of course is to touch your brain but the way they get there is by starting on the outside and politely…"
Podcasts
Swift: The Ray Wenderlich Podcast Episode 10
Ray Wenderlinch discusses the latest Apple News - WATCH, iPhone 6+,  Pay, and of course talks about Swift with special guest @ColinEberhardt.
Developing for iPhone 6 and Apple Watch, with Murley, Richter, and Simmons
Discussion about the latest Apple News right after the Apple Live announcements. The most surprising thing I learned was that if you press the home button on the iPhone 6+, your current app screen slides down about half way so you can easily reach the action buttons on the navigation bar of the app!
Iterate 74: Designing for iPhone 6 and Apple Watch, with Kawano, Sinclair, and Wiskus
Another discussion about the iPhone 6 and WATCH - this time from the design perspective.
Swift Code
SpringySlider
The spring slider is control used to select a single value from a continuous range of values, just like UISlider. The main difference is change in a thumb’s behaviour. Thumb can be moved to change value after reaching defined tilt angle. When the user releases the slider’s thumb control it comes back to initial position just like a spring. Lights, camera, action!
RSBarcodes_Swift
1D and 2D barcodes reader and generators for iOS 7 with delightful controls. Now Swift.
Tasty Imitation Keyboard
A custom keyboard for iOS 8 that serves as a tasty imitation of the default Apple keyboard, built using Swift, autolayout (if performance permits), and the latest Apple technologies!
Swift Thoughts
Yesterday, I went to get a complimentary fitness assessment at the new gym I joined, which ended up being either the trainer or I entering my health data into a very old legacy software system that looks like something from 10+ years ago on a windows desktop computer. The whole time, I couldn't help but think how important HealthKit + WATCH is. When I didn't know information such as what my blood pressure normally is or how much I actually walk per day, this is something that would be pretty simple to access from a HealthKit + WATCH fitness product.
Furthermore, my health data would be shared between my doctor and my fitness trainer (with my permission of course). After going through a pretty painful pinch test to measure my body fat, it would have been nice to forward that information to my doctor. Unfortunately, just like with any new technology, I clearly saw that it will take a while for gyms and doctors to embrace the power of HealthKit. When I asked my trainer if they'd like an iPad app instead of the horrible fitness tracking software they were using, she said "but this system does so much!".