When the UIViewController auto-rotates, it creates a temporary UIView that contains 4 black UIViews that simulate the black borders. A fix for this would be just to hide the temporary UIView, or change the colors, on SPViewController's willAnimateRotationToInterfaceOrientation:duration: method.
Also when the UIViewController auto-rotates, it will add some animations to the UIViewController's view, which happens to be Sparrow's view. The two animations it adds is a "transform" animation (which creates the rotation animation), and a "bounds" animation (which just smoothly swaps the width/height of the bounds).
You can actually modify this a bit by overriding SPViewController's willAnimateRotationToInterfaceOrientation:duration: method and modifying/removing animations.
If you remove the transform animation, it will instantly rotate Sparrow's view. You should also be able to alter the duration of the transform so that it may animate slower/faster.
If you remove the bounds animation, I believe it instantly changes the bounds of the Sparrow view to the upcoming orientation bounds.
There is no easy way of changing the animation bounds properties without it greatly changing the perspective of Sparrow's stage.
Changing the bounds of the Sparrow view while maintaining the correct perspective is a bit hard, so I will just give you example code on how to remove and alter animations for now:
@implementation SPViewController (AutoRotationFix)
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
duration:(NSTimeInterval)duration
{
// Get Sparrow's view
CALayer *glLayer = [Sparrow currentController].view.layer;
//Options:
//1. Modify the transform animation
CABasicAnimation *transformAnimation = [glLayer animationForKey:@"transform"].mutableCopy;
//change properties here
[glLayer addAnimation:transformAnimation forKey:@"transform"];
//2. Modify the bounds animation
CABasicAnimation *boundsAnimation = [glLayer animationForKey:@"bounds"].mutableCopy;
//change properties here
[glLayer addAnimation:boundsAnimation forKey:@"bounds"];
//3. Remove the transform animation
[glLayer removeAnimationForKey:@"transform"];
//4. Remove the transform animation
[glLayer removeAnimationForKey:@"bounds"];
//=== ORIGINAL SPARROW CODE ===//
// inform all display objects about the new game size
BOOL isPortrait = UIInterfaceOrientationIsPortrait(interfaceOrientation);
SPStage *stage = self.stage;
float newWidth = isPortrait ? MIN(stage.width, stage.height) :
MAX(stage.width, stage.height);
float newHeight = isPortrait ? MAX(stage.width, stage.height) :
MIN(stage.width, stage.height);
if (newWidth != stage.width)
{
stage.width = newWidth;
stage.height = newHeight;
SPEvent *resizeEvent = [[SPResizeEvent alloc] initWithType:SPEventTypeResize
width:newWidth height:newHeight animationTime:duration];
[stage broadcastEvent:resizeEvent];
}
}
@end