Semester 2 – Post 5

I am trying to get the logic for the password and username to work with the login with the following code:

 

-(void)loginViewControllerDidFinish:(LoginViewController *)controller

{

if  ([((Truck_Tracker_AppAppDelegate *)[UIApplication sharedApplication].delegate).listPeople containsObject:

[[Person personWithEmail:[controller.usernameTextField.text]] password:[controller.passwordTextField.text]])

{

// Do whatever is needed upon a successful login.

[self dismissModalViewControllerAnimated:YES];

} else {

// Display an error message, and do not dismiss the login screen.

[controller alertFailedLogin:self];

}

}

The code won’t run because it issues an “Expected identifier” which is basically what I am looking to find. I understand what this says, but I do not think I am to the level of writing it yet.

Semester 2 – Post 4

I was successfully able to get the modal view to pop up last meeting; however, it required a little more tweaking to get it somewhat functional. This time I was supposed to dismiss the keyboard and get the logic to check the username and password database of users.

Thus far I have been unsuccessful in finding the correct logic to do so, but I am very close to getting the keyboard to dismiss.