So I got this button that with a if
statement that pushes to a the StartViewController
. I made a NSLog@"transition successful"
in the viewDidLoad
of this viewcontroller to check if the transition is made.
In the log its showing the transition successful but on the screen not transition is made.
Here is the code:
-(IBAction)initialButton:(id)sender {
NSLog(@"initialButton clicked");
if([userEmail.text length] <4)
{
[WCAlertView showAlertWithTitle:@"Email is empty" message:@"You haven't entered an email yet. Please enter one so we can sent you the shipping labels." customizationBlock:^(WCAlertView *alertView) {
alertView.style = WCAlertViewStyleBlackHatched;
} completionBlock:^(NSUInteger buttonIndex, WCAlertView *alertView) {
if (buttonIndex == 0) {
NSLog(@"Cancel");
} else {
NSLog(@"Ok");
}
} cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok", nil];
}
else
{
StartViewController *startViewController = [[StartViewController alloc] init];
self.transitionController = [[[TransitionController alloc] initWithViewController:startViewController] initWithNibName:@"StartViewController" bundle:nil];
[initialViewController.view removeFromSuperview];
self.window.rootViewController = self.startViewController;
}
}
and here is the log:
2012-12-14 09:22:55.431 Janssenpakketapp[24165:c07] initialViewController loaded
2012-12-14 09:23:04.021 Janssenpakketapp[24165:c07] initialButton clicked
2012-12-14 09:23:06.116 Janssenpakketapp[24165:c07] Ok
2012-12-14 09:23:11.909 Janssenpakketapp[24165:c07] initialButton clicked
2012-12-14 09:23:11.911 Janssenpakketapp[24165:c07] transition succesful