Handling app delegates and switching between views

前端 未结 3 1178
粉色の甜心
粉色の甜心 2020-12-07 10:52

I\'m getting a warning about a semantic issue pertaining to passing a *const _strong to type id and cannot seem to fix it no matter what I change.<

3条回答
  •  猫巷女王i
    2020-12-07 11:00

    If you only want to switch views, you might want to try the code below. It works for me.

    ProductsViewController *controller = [[ProductsViewController alloc] initWithNibName:@"Products" bundle:nil];
    [self.navigationController pushViewController:controller animated:YES];
    

    I used that to have my main menu in my app switch over to the game.

    If you want a special animation (I think I saw Cross Dissolve?), however, I have no idea. I will try digging through the documentation to see, and I will tell you what I find.

    As for the "*const_string to type id", although I don't know what you are trying to do with your app, I think the problem is the id delegate in your view controller.

提交回复
热议问题