Heya, I have loaded a uiviewcontroller's view into the main window in the AppDelegate file. If i do it by loading a nib name (and create the UIViewController on the fly), the buttons in the xib file fire properly. If i do it like this, the buttons are inactive.
Happy to give more information, just unsure which info to give.
- (BOOL)application:(UIApplication *)application didFinishLaunc开发者_运维知识库hingWithOptions:(NSDictionary *)launchOptions {
launchScreen = [[LaunchScreen alloc] initWithNibName:nil bundle:nil];
[launchScreen.view setUserInteractionEnabled:YES];
[window addSubview:[launchScreen view]];
[window makeKeyAndVisible];
return YES;
}
Ok, I seem to have found the culprit, there was a ViewController in the main xib file that was being overlayed ontop of the buttons stopping them from being used.
精彩评论