Apple Mac

Review: Iconic Book: A Photographic Tribute to Apple Innovation

Review: Iconic Book: A Photographic Tribute to Apple Innovation

Ten days ago, I’ve came by Iconic Book: A Photographic Tribute to Apple Innovation” while surfing the net. First thing that crossed my mind was: “Wow that the Apple Bible”. I immediately ordered my copy ($75 cost for the book plus 50$ for ship costs -I live in Greece-). Three days ago I found a note in my door, that I have a parcel waiting for me in my nearest post office. Next morning I got it. First impression? This book is much bigger than I thought it would be. It is elegant, printed in high quality paper, exactly like an Apple book should be.

Migrating to modern Objective-C

Migrating to modern Objective-C

Last year at WWDC 2012, Apple introduced Modern Objective-C alongside iOS 6. So what’s this? In a few words, it is a huge step forward to help developers write less code to achieve the same things. Worth mentioning is that modern Objective-C has nothing to do with iOS versions, it has to do with the compiler, which means that it is backward compatible.

Let’s dive into the basics of transitioning to modern Objective-C. Xcode offers a refactoring tool (edit>Refactor>Convert to Modern Objective-C syntax) which will convert your project to modern objective-c (it will also set the appropriate flag in build settings). If you would like to adopt modern Objective-C when writing your code, which is the best, as it is intended to help you write less lines of code, general rules for doing so are the following.

Extend UIImageView class to easily add border to images

Extend UIImageView class to easily add border to images

When coding for iOS, I usually style images with shadows show the layout looks more elegant. Adding shadows is easy, but when it comes to adding borders to UIImageViews things become trickier. That’s because when adding a border to a UIImageView, this border hides info from the image. To solve this issue, we have to rescale the image and then add the border to the scaled image.