Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
does apple require applications submitted now (after 3.0) to conform only to 3.0 SDK?

i realized that my willAnimateRotationToInterfaceOrientation:duration was not recognized in OS 2.2.1, so i "downgraded" to the previous willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration. when running, this message appears in the console

Code:
Using two-stage rotation animation. To use the smoother single-stage animation, this application must remove two-stage method implementations.

could i perhaps somehow poll the device for it's OS and use the method which is more appropriate? if so, how could i do that?
 
Apple have stated they will only be testing in 3.0, but that obviously means any 2 code needs to run in 3.0. This was note a month or so ago.

As far as I'm aware, it doesn't mean everything needs to be 3.0 standard. People are still uploading apps compiled in 2.2.1, they just need to make sure that it works in 3.0. That's why all of the latest updates have started saying 'Tested in version 3' or whatever.

Apart from a few specific API details, I think it's all backward compatible anyway.
 
Actually, your second point is more interesting to me. 'Can you poll the device for the OS version?'

I have an app in progress that does this really odd thing about loading the NIB on a details view in a different way depending on the OS. In 2.2.1 the NIB loads partly under the navbar, but sits directly below it in 3.0. This has been driving me mad for days. If I could conditionally check the OS version, I could load a different NIB.

3.0 doesn't allow anything to sit under the bar, even if the bar is set to transparent, but it does in 2.2.1.

My current solution is to average the position of the text field and will move to 3.0 only in a month or so.
 
Code:
[[UIDevice currentDevice] systemVersion]

Might be of interest to you....

yes i found this, but unfortunately it doesn't seem to be useful in my case, since the device automatically calls method names used for changing orientation. i though that just by simply including the two:

1. willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration

2. willAnimateRotationToInterfaceOrientation:duration


that the device would automatically call the most appropriate method depending on it's OS. if OS 3.0 was present, the device would first find willRotateToInterfaceOrientation, and ignore willAnimateFirstHalfOfRotationFromInterfaceOrientation:duration and/or willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration. including NSLogs in these methods revealed that both are called during run time when the device orientation switches.

my last idea was to call willAnimateFirstHalfOfRotationFromInterfaceOrientation:duration like this:

Code:
- (void)willAnimateFirstHalfOfRotationFromInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration
{
float systemVersion = [[UIDevice currentDevice] systemVersion];

if (float >= 3.0)
{
//call willAnimateRotationToInterfaceOrientation:duration
}
else
{
//call willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration
}
}

this also failed, as both methods were called during runtime.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.