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

Ok、

理由はわかりませんが、ほとんどすべて(Xcodeの再インストールを含む)を試した後、問題はコントローラーで、内部に他のコントローラーを提示していたことでした

viewDidAppear

私はこれまで何度もこれを使用してきましたが、これは一度も起こりませんでした。「それは悪い習慣でした、b ** ch」

于 2013-05-08T17:21:20.073 に答える