I am trying to make an app when I use a log in screen and I communicate to a server.
When I connect to the server it returns me a value true if my log in is correct or false if its incorrect.
Then I try to make the app to switch in a new UIViewController (after I press the log in button) if only the log in is correct.
For that I store the value that server returns in a string and compare that with another and implement the UIViewController switch.
After running my app I get an error
:Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason:
Could not load NIB in bundle: 'NSBundle </Users/dimitriskoumouras/Library/Application Support/iPhone
Simulator/6.0/Applications/9E756F03-38C1-453C-A26E-497AA7DDAECA/Administrator.app> (loaded)'
with name 'FourthViewController.xib''!!
Posting some code :
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData*)data {
NSLog(@"EWYFPicOneViewController - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData*)data {");
string = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding];
NSLog(@" data == %@",string);
NSString *compare = [NSString stringWithFormat:@"true"];
if ( [compare isEqualToString:string]) {
UIViewController* FourthViewController = [[UIViewController alloc] initWithNibName:@"FourthViewController.xib" bundle:[NSBundle mainBundle]];
[self.view addSubview:FourthViewController.view];
}
else
NSLog(@"validation not complete");
}
Any thoughts?? (i start to think that maybe my whole logic is wrong)..
Thanks in advance!!
Try this after parsing…
}
and also use this….