Creating Classes
Many programmers—professionals and students, hobbyists and cowboy coders—have grown up in the mind-set of object-oriented programming. As Janie once said on the NSBrief podcast, “I didn’t think I was learning object-oriented programming. I thought I was learning programming…like that was the only way to do it.”
And it’s not like anyone’s wrong to learn OO! It’s the dominant paradigm for a good reason: it has proven over the decades to be a good way to write applications. Whole languages are built around the concepts of OO: it’s nigh-impossible to break out of the OO paradigm in Java, and Objective-C has OO in its very name, after all!
So let’s see how Swift supports object-oriented programming. The heart and soul of OO is ...
Get iOS 9 SDK Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.