I didn't see an API either, however as you mentioned, you can poll for the gravity data, and I just wanted to post that code here in case some find it useful. You can modify this to your own need, such as detecting last orientation and comparing it to current if you want a callback of the change.
//**************************************************************
// Update loop portion to UIViewController
//**************************************************************
@property (strong) CADisplayLink *updateLoopTimer;
self.updateLoopTimer = [CADisplayLink displayLinkWithTarget:self selector:@selector(updateRefreshRate:)];
[self.updateLoopTimer addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
-(void)updateRefreshRate:(CADisplayLink *)displayLink
{
CFTimeInterval deltaTime = displayLink.duration * displayLink.frameInterval;
[self update:(float)deltaTime];
}
//******************************************************
// Update loop
//******************************************************
-(void)update:(float)dt
{
#ifdef TV
//***************************************
// Detect button presses
//***************************************
//self.gameControler = [[GCController controllers] firstObject];
if( self.gameController != nil )
{
GCMicroGamepad* microPad = self.gameController.microGamepad;
if ( microPad != nil )
{
GCMotion *motion = self.gameController.motion;
GCControllerDirectionPad *dpad = microPad.dpad;
if( motion != nil )
{
GCAcceleration accelVector = motion.gravity;
if( fabs(accelVector.x) > fabs(accelVector.y) )
{
NSLog(@"Sideways");
}
else
{
NSLog(@"Upright");
}
}
}
}
#endif
}