iphoneiosuiviewcontrollersparrow-framework

Move a viewController to the back of the window


I'm using the open source ShareKit framework. It requires a viewController to modally draw its share menus and such. I'm making a game with the Sparrow framework, which just adds a custom SPView object to the window in the AppDelegate. I want to create an empty UIViewController and just have it running behind the SPView.

//AppDelegate.h
UIViewController *vc;

//AppDelegate.m
//didFinishLaunching method
vc = [[UIViewController alloc] init];
[window addSubview:vc.view];

The code above seems to draw an empty viewController on TOP of everything else, no matter where I put the code. I've put it before my game initialization, as well as after, but having the code present seems to block all touch input.

Is there an easy answer for this?


Solution

  • [window sendSubviewToBack:vc.view];