Dominik Hauser on using guard for unit tests:
“Here is the problem: Sometimes you want to test an element that could be nil. For example, I recently wanted to test if a view controller has a right bar button item with a given target.”
“The problem with this code is, that if there is no right bar button item the test execution crashes. “
Using Guard In Unit Tests
Large or small, companies looking to expand their reach with localized apps need to find someone to do the actual translations. But how do you actually find the translators? Do you rely on freelancers or go with a professional translation firm?
Regardless of the translation source, there is no guarantee that they will understand your app’s technical nuances. Luckily, El Loco offers solutions to these challenges (and others).
Create your free account today and make your iOS app truly global.
El Loco is a sponsor of iOSDeveloperTips.com.
Cocoa Programming for OS X has been the goto book for Mac development since the first edition was published. With the release of the 5th edition, the book has been updated for OS X Yosemite (10.10), Xcode 6 and Swift.
The Big Picture
I like the approach of the book, jump right in and build an app – specifically, a simple password generator application. The introduction includes a brief summary of MVC, steps to create an OS X project, building a UI with Interface Builder and writing the necessary Swift to glue everything together.
After the introduction to OS X app building, there are a few chapters dedicated to the basics of Swift, including types, enums, classes and structures, as well as the basics of optionals, looping and working with Objective-C foundation frameworks.
From here forward the focus is on describing and creating code examples using OS X frameworks. One very helpful theme carried throughout the book is the use of visuals to depict concepts. For example, there is good use of object diagrams and MVC architecture views to show relationships of controls and concepts within applications.
The book is all about describing and creating examples of OS X app concepts and integrating the relevant APIs, versus simply a rundown of APIs specific to OS X. Handling keyboard events, archiving, mouse events, sheets, pasteboards, among other topics, all are covered in detail.
What I appreciate most about Cocoa Programming for OS X is the thorough treatment of the topics that provide the most mileage as a developer new to OS X. This is an excellent resource for developers interested to build Mac apps.
Enter Drawing, Win A Copy: Cocoa Programming for OS X
Many thanks to Brad Yale of Pearson for contributing two copies of the book for the Swift Sandbox newsletter giveaway. Register for the newsletter and you are entered in the drawing.
Here is a list of the Swift books to be given away on August, 28th.
As an iOS developer, you have a skill set that’s highly sought after by today’s most innovative companies. Leverage your unique position with Hired—the first two-sided marketplace for full-time and contract opportunities.
In one week, your profile will get exposure to over 2,500 tech companies. If they’re interested, they’ll send you an interview request with compensation info upfront. Meaning you get to decide which offers are worth pursuing before having to interview.
Check out Hired and discover great new job opportunities today!
Hired.com is a sponsor of iOSDeveloperTips.com.