S Link
Ready for your next challenge?
iOS developers, watch out: Catalysts and Runtastic teamed up to create a new contest experience for you โ the Mobile Coding Contest. Sign up now, see how your skills match up against other code enthusiasts and participate on October 20th โ online or at one of our locations.
try! Swift India 2017
try! Swift India is an amazing chance for developers in the Asian Pacific region to learn the latest in Swift Development. Learn from 15 international speakers, engage with the community. Coming to Bangalore on November 18th & 19th 2017! Limited tickets available.
Swift Around the Web
Dictionary and Set Improvements in Swift 4.0
Whoa - didn't know about default values to avoid optionals when looking up a key in a dictionary...
// Begin with a single banana
var cart = [๐: 1]
// One banana:
cart[๐] // Optional(1)
// But no shrimp:
cart[๐ค] // nil
// Still one banana:
cart[๐, default: 0] // 1
// And zero shrimp:
cart[๐ค, default: 0] // 0
It's a nice way to avoid unwrapping optionals, but be careful to make sure that the default value will not conflict with an actual key value from the dictionary!
Coding
Easier Swift Layout Priorities
A really nice use of operator overloading for when you need to do frequent operations with raw values of enums. Keep this in mind!
iOS 11: The DeviceCheck API
Remember when UUIDs were a thing? Now, DeviceCheck
is the new Apple-approved safer alternative. It will for sure come in handy for many apps (just like UUID was super useful before), so make sure to get familiar with its limitations and capabilities.
Apple News
Design
UI Design for iPhone X: Top Elements and the Notch
I like the transparent navigation bar... No ๐ please!
Other Cool Stuff
Food Combining Chart
This week, I've been reading about the ancient Chinese Tao philosophy on health and longevity to see how I can improve. I already know to eat healthy foods, but I was surprised to learn about the concept of Food Combining.
Apparently, mixing certain foods in the same meal can have bad effects on digestion. One such surprising bad food combination is Starch + Protein, so meals that include steak and potatoes or bread and meat (hamburgers, eggs + toast) are a no-no according to these rules. Luckily, avocado toast makes the cut ๐
Up to you to do your own research and believe it or not, but I'm going to try to follow Food Combining as much as I can in my own diet and see what happens!
Videos
Driving View-State through Data for Fun and/or Debugging
"Whether or not youโre representing it as such, everything mutable in your app is actually a model. View-state is a model. Changes to view-state should ideally be taking a data-driven path."
Amazing talk from Matt Gallagher at try! Swift NYC on how to extract your view-state into a nice, easy-to-read, testable model with fancy functionality such as jumping forwards and backward in time, replaying your user-interface, and logging and inspecting your view state for easy debugging.
MVVM at Scale: Not so Simple...
MVVM is my personal favorite, but this is a good reminder to follow patterns with careful thought, not just because they're popular...
Swift Code
- BulletinBoard - Generate and Display Bottom Card Interfaces on iOS
- VisionFaceDetection - An example of use a Vision framework for face landmarks detection in iOS 11
- mapbox-navigation-ios - Turn-by-turn navigation logic and UI in Swift or Objective-C on iOS
- Closures - Swifty closures for UIKit and Foundation
- SwiftInstagram - A Swift client for Instagram API
- BigInt - Arbitrary-precision arithmetic in pure Swift
Swift Thoughts
This week, I'm excited to be visiting India to finalize some planning for try! Swift India. If you're attending the Swift Chennai meetup, come say hi!