0

I'm having a problem with a ViewController.

In hierarchy i have 3 ViewController:

  • Login
  • Grid
  • Profile

From Login to Grid, there is no problem. But when i'm try to go from Grid to Profiel, Grid is dismissed, i'm using:

ProfileViewController *perfil = [[ProfileViewController alloc] initWithNibName:nil bundle:nil];

[self presentViewController:perfil animated:YES completion:nil];

from a Table, but i try from a button action too.

I create other viewcontroller (testviewcontroller) and try to present it and the same problem.

The view is presented, when i set animated to "YES" the view is presented, but just when it finish the parent is dismissed.

To clarify:

From grid controller no matter what i do, when profile (or test) controller is presented, grid is dismissed automatically.

I never see something like that.

Can anyone help me?

New info:

I create a new controller and instead to go from login to grid, i'm tried to go from login to the new controller, and the same problem happen.

New info (more weird):

I have this 2 calls to present a controller:

- (IBAction)ingresar:(id)sender
{
    aViewController *grilla = [[aViewController alloc] initWithNibName:nil bundle:nil];
    grilla.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
    [self presentViewController:grilla animated:YES completion:nil];
}

- (IBAction)registro:(id)sender
{
    RegistroViewController *registro = [[RegistroViewController alloc] initWithNibName:nil bundle:nil];
    registro.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
    [self presentViewController:registro animated:YES completion:nil];
}

The first have the issue of magically dissapear, the second dont...

4

1 回答 1

0

好的,

我不知道为什么,但是在尝试了几乎所有事情(包括重新安装 Xcode)之后,问题是在控制器中,我在里面展示了其他控制器

viewDidAppear

我以前用过很多次,从来没有发生过这种情况,我只能相信这是因果报应说“那是一种不好的做法,b ** ch”

于 2013-05-08T17:21:20.073 回答