Time to Close up Shop — Logging Out
The last part of the tutorial is to allow the user to logout. For that, simply add the following code in WallPicturesViewController.m, inside -(IBAction)logoutPressed:(id)sender:
-(IBAction)logoutPressed:(id)sender
{
[PFUser logOut];
[self.navigationController popViewControllerAnimated:YES];
}
Build and run, and you’re done! :]
Where To Go From Here?
Here is the complete example project you developed in the above tutorial.
Hopefully you have seen how easy it is to upload and download objects based on PFObject and how to work with PFUsers in Parse!
At this point, you’re likely inspired to add some backend functionality to a project that could benefit from it; or perhaps a cloud app you thought was going to be too hard is now within reach! :]
I hope to see some apps made from you with Parse in the future. If you have any questions or comments, please join the forum discussion below! :]
This is a post by Tutorial Team Member Antonio Martínez, a mobile software developer currently working as an iOS Developer in London.