I'm using iOS SDK 4.2.
I think that the ternary conditional op is(?) implemented differently on the simulators (iPhone4.1, 4.2. iPad 3.2, 4.2) than on actual devices. Because:
iPad ? xibName = @"MyViewController-iPad" : @"MyViewController";
works perfect on those simulators but fails on my iPhone 4 (4.1)
while writing this way:
xibName = (iPad) ? @"MyViewController-iPad" : @"MyViewController";
allows it to work on both the simulators and device.
Anyone can tell why? Is it a bug? Is the "2nd version" better and i should always write that way?
it's strange how compiler accepts both and simulators work with both but the device only accepts one... maybe a bug for apple to check out?