开发者

Buttons not working in XIB file

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜