Search code examples
iosxcodeuistoryboardsegue

Segue is reverted automatically


I have a Storyboard Menu controller that go a second controller with segue,

I create a custom class that inherit ViewController, it is empty and I assign it to the second controller

When I push the segue with [self performSegueWithIdentifier:@"ReservasSegue" sender:self]; It do the segue but when it finish automatically revert the Segue withouth any message or say something.

If I quit the custom class to the second controller It works perfect

SecondController.h(ReservasListado.h)

#import "ViewController.h"

@interface ReservasListado : ViewController


@end

SecondController.m(ReservasListado.m)

#import "ReservasListado.h"


@interface ReservasListado ()

@end

@implementation ReservasListado

- (void)viewDidLoad {
    [super viewDidLoad];


}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end

Solution

  • Seems that @interface ReservasListado : ViewController

    Should be @interface ReservasListado : UIViewController

    I dont know why... but it works