I've got this really weird bug on my code, and I have no idea on how to solve it.
I'm using the stroryboard scheme as shown on the picture attached. One navigation controller, that performs a push segue programatically, and, when clicking the "Find" button, the "findsegue" is supposed to be performed.
So, the problem is: Randomly, the view is not loaded. viewDidLoad is executed, but nothing changes on my screen. Some other times, it all works like a charm.
Here is the code that is called when the "Find" button is pressed:
- (IBAction)encontreBtn:(id)sender {
NSLog(@"Segue is going on");
[self performSegueWithIdentifier:@"findsegue" sender:sender];
}
@"Segue is going on" is always printed. And that's the viewDidLoad:
- (void)viewDidLoad
{
[super viewDidLoad];
NSLog(@"DIDLOAD");
// Do any additional setup after loading the view.
_topBar.font = [UIFont fontWithName:@"LibelSuit-Regular" size:23];
_topBar.textAlignment = NSTextAlignmentCenter;
_tableView.dataSource = self;
_tableView.delegate = self;
}
@"DIDLOAD" does print as well.
As a note, viewDidAppears runs as well.