Copyright (c) 2011 Doron Katz. All rights reserved. DoronKatz registered under ABN 68 954 062 611. Apple, the Apple logo, iPod, iPod touch, and iTunes are trademarks of Apple Inc., registered in the U.S. and other countries. iPhone is a trademark of Apple Inc. App Store is a service mark of Apple Inc. Theme by Cory Watilo

Filed under: Objective-C

Using constants with preprocessor directives

It is important when you work on your application, that you use a file to store all your application-wide constants, usually strings that you would normally store things such as:

  • Server URL's, for when you access a web service
  • Key tokens, such as for various third-party APIs, like TestFlight, where you have a constant key that you need to refer to. 

These constants don't usually change, but if they do change, you have a single source to change, that would be reflected Application-wide.

To better illustrate this, I will give you the example I use with one of my apps:

Read the rest of this post »

Thoughts and Observations Regarding This Week’s iPhone 4S Event, Written Almost Entirely Before Wednesday’s Sad News, But Which the Time Has Come to Publish Because Life Goes On | Daring Fireball

A great article from Daring Fireball to explain why people should not be disappointed with the iPhone 4S release.


Thoughts and Observations Regarding This Week’s iPhone 4S Event, Written Almost Entirely Before Wednesday’s Sad News, But Which the Time Has Come to Publish Because Life Goes On

What More Could You Have Wanted in a hypothetical ‘iPhone 5’ Today?

A 4-inch screen? What sign has Apple ever given that it will ever change from the one-size-fits-all 3.5-inch screen? Every single iPhone and iPod Touch ever released has had the exact same size screen.

Now, maybe you would prefer a 4-inch screen. Or maybe a 4.5-inch screen. And maybe someone else would prefer a slightly smaller 3.25-inch screen. That’s not how Apple rolls, especially with iOS devices. There is no doubt that some people would prefer a bigger screen. But nor is there any doubt that many other people would not. I wouldn’t. I like to see things get smaller, not bigger. Bigger is not necessarily better. Apple decided on the optimal size for an iPhone display back in 2006. If they thought 4-inches was better, overall, as the one true size for the iPhone display, then the original iPhone would have had a 4-inch display. It’s not like 4-inch screens are harder to make, or use some sort of new technology. If anything they’re surely easier to make, as the pixels are less dense.

One big advantage of a 3.5-inch display: with average-size hands, your thumb can reach any pixel on screen more comfortably while holding the phone one-handed. Judging from my email, many proponents of bigger screens — those who are disappointed that the iPhone 4S doesn’t sport a 4-inch display — see no such trade-off. Bigger is better, period, they say, and anyone who says otherwise is in denial that Apple is falling behind its competition. But by that logic, 5-inch screens would be better than 4-inch ones, and 6-inch screens better still. That’s silly. Bigger is not necessarily better for handheld/pocket devices.

Read the rest of this post »