Other Cool Stuff
This is not Swift related, but this week I discovered Mac’s built-in Digital Color Meter app (thanks @holincart for showing me!). You can point to anything on your screen, and it’ll tell you what it’s RGB color is. Super useful if you’re not as good at photoshop!
What's New in Swift
On Monday, Apple released iOS 8 Beta 4! Here are the highlights:
- Swift now has Access Control! You can set your variables and functions as either private, internal, or public. Internal to your app is the default, so if you’re building a framework, make sure to explicitly set your public API variables and function to public.
- The @final, @lazy, @optional, @required attributes no longer need an @ sign. They are now just plain old final, lazy, optional, required.
- Dictionary now has a built-in Boolean isEmpty property (so do Swift arrays). Go ahead and change the ugly “if myDictionary.count > 0” statements to “if !myDictionary.isEmpty”
- XCode 6 now supports landmarks: //MARK: //TODO: //FIXME. From playing around with it - it seems very buggy. So add those in, but wait for the next beta for it to really work.
- The ..< operator for is now called a “half-open” range operator instead of “half-closed”. Not a big change, but got to love Apple’s optimism :)
For a full debrief on the changes, check out the XCode Release Notes and the Swift Programming Language Book Revision History.
Swift Code
It’s really impressive to see so many cool Swift-only libraries coming out only days after Swift was announced. Here are some of the most impressive ones:
- MorphingLabel - Incredible Label animations inspired by the .Scale effect originally introduced by Apple in WWDC 2014
- Hamburger Button - a really neat hamburger-button transition demo using core animation in Swift.
- Bouncy Placeholder - A cool UITextField extension that demonstrates singleton/swizzling/association in Swift
- SwiftyJSON - Parsing JSON in Swift. Believe me, it’s painful. You’re going to want to use this.
- SwiftZ - Functional Programming in Swift. Let me know if you understand this :)
Swift Thoughts
Welcome to my first newsletter! I know some of you signed up for this newsletter a while ago, so in case you forgot, I’m NatashaTheRobot. Thanks for signing up :)
While my initial intention was to send out an iOS newsletter, the most exciting thing has happened in the last 50+ days. As you know, Apple has announced a completely new programming language - Swift!
I’ve been experimenting with Swift a lot since it came out, and I cannot be more excited about this new chapter in iOS development. Everyone is now a beginner! So this newsletter will contain mostly Swift-related information with a sprinkling of iOS product and design stuff here and there (after all, we’re all using Swift to make something).
I’d love to hear from you, so don’t hesitate hitting reply and letting me know what you think and how I can improve this newsletter to best serve your needs, or if you have any questions. So here we go!