I want to do something like this in my iOS application.
I alredy have a splash screen and a login screen,, After the Splashviewcontroller it displays the LoginViewcontroller.
Im checking some conditions inside the ViewDidload
and in a particular condition I want to push to an another viewcontroller. This is working in ios 5,and 6 but in ios 7 this is not loading when this condition is true.
This is my code
-(void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
self.navigationController.navigationBar.hidden=YES;
mutArrLoggedUsrarray=[[NSMutableArray alloc]init];
newuser=[NEWLoginUSER sharedManager];
nws=[NEWWebservice sharedManager];
alertObject=[AlertsString sharedManager];
alert=[CreateProgressAlert sharedManager];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *strLogStatus=[defaults objectForKey:@"LOGWAY"];
if ([strLogStatus isEqualToString:@"EMAIL"]) {
phoneLiginView.hidden=YES;
emailLoginView.hidden=NO;
isCurrentViewPhone=NO;
KeychainItemWrapper *keychainItemPHONE = [[KeychainItemWrapper alloc] initWithIdentifier:@"PHONENO" accessGroup:nil];
NSString *userTypedEmail=[keychainItemPHONE objectForKey:(__bridge id)(kSecAttrAccount)];
NSString *userTypedPassword=[keychainItemPHONE objectForKey:(__bridge id)(kSecValueData)];
newuser.strEmail=userTypedEmail;
TxtEmail.text=newuser.strEmail;
// [changeBoxbtn setTitle:@"LOGIN WITH PHONE NUMBER" forState:UIControlStateNormal];
changeBoxbtn.hidden=YES;
}
else if([strLogStatus isEqualToString:@"PHONE"])
{
txtUsrname.text=[newuser.strPhoneNum stringByReplacingOccurrencesOfString:@"+94" withString:@""];
isCurrentViewPhone=YES;
//[changeBoxbtn setTitle:@"LOGIN WITH EMAIL ID" forState:UIControlStateNormal];
changeBoxbtn.hidden=YES;
}
else{
isCurrentViewPhone=YES;
RegisterViewController *regvieww=[[RegisterViewController alloc] initWithNibName:@"RegisterViewController" bundle:nil];
[regvieww.view addSubview:regvieww.viewVerify];
[regvieww.view addSubview:regvieww.viewTop];
[regvieww.view addSubview:regvieww.regViaEmailView];
[regvieww.view addSubview:regvieww.selectorView];
[self.navigationController pushViewController:regvieww animated:YES];
}
originalCenter=self.view.center;
if ([UIScreen mainScreen].bounds.size.height==480) {
originalCenter.y=240;
}
}
Can u tell me what is the problem with this. And how to solve this