Natasha The Robot

Currently learning... iOS development!                                             You can follow me on Twitter here

Swift: How To Conform to the Sequence Protocol

I was testing out the SwiftyJSON library this weekend, and got the following error when I tried to iterate over my JSONValue object - an array of dictionaries. This was not possible until I implemented the Sequence protocol. Here is how I did it...

iOS Designers: Say Goodbye to Pixel Perfect

The future of design is already here, and it is very dynamic, exciting, challenging, and far from pixel perfect. Here is what today's iOS designers have to consider in their design (I know it's a lot harder than the pixel perfect version!):

iOS 8: Self Sizing Table View Cells with Dynamic Type

When Dynamic Type came out in iOS7, I was hoping to get to use it. After all, who doesn't want to make their app more readable for users who need it? In iOS8, adding Dynamic Type is so easy, a cave man can do it! Here is all you have to do...

Swift: How To Be Lazy

As an Objective-C developer, I use lazy loading of my properties whenever possible. Lazy loading is initializing your properties only when they are called. This way, memory is not allocated for that property until absolutely necessary, and if the property is actually never used, the memory doesn't get allocated at all. In Swift, creating lazy properties is easier than ever!

Swift: Beware of Computed Properties

Yesterday, I accidentally stumbled into yet another cool Swift feature: Computed Properties. I saw it used by someone else in their code, and found the syntax confusing enough at the time to think it did something different than it does! Beware...

Swift: Demystifying Parameter Names In Functions

One of the frustrating things I've encountered with Swift is how to work with parameter names in functions. Sometimes the parameter name is required and sometimes it's not. As an Objective-C developer, I LOVE having parameter names very explicitly present - I like how readable it makes the code. So I decided to investigate a bit to make sure I got the rules down for when I write my own classes and methods. Here is what I found...

Swift: Using Complex Enums To Improve TableViews

One of the things that puzzled me about Swift when it came out was that you could put functions in an enum! That seemed like a pretty crazy pattern. However, as I've been working on a few simple Swift TableViews and CollectionViews this week, I fell in love with how simple the complex Swift enum can make things.

Swift: The Deceptively Simple Programming Language

When Swift first came out, there were a lot of tweets from non-iOS developers who said something like "everyone is an iOS developer now". Here is why that's not the case.

XCode Tip: Catch More Bugs With The Clang Analyzer

Yesterday I learned from @coffmanben that XCode has a built-in Clang Static Analyzer. The Analyzer looks through your source code and finds bugs in your C, C++, and Objective-C code. I've been using it for a day now, and really love seeing the logic flaws in my code that I can easily fix. Here is how to turn it on...

Calabash iOS Tutorial

One of my favorite part of Ruby on Rails was how easy it was to do Test Driven Development (TDD). I LOVE the confident feeling that comes with making HUGE changes to my code base when my project is well-tested. In fact, my favorite days coding include committing a branch where I got to delete 1000+ lines of code only to replace it all with 200 lines. I've been researching iOS testing tools recently, and Calabash is one of the ones you should check out...