Advertisement
Guest User

Untitled

a guest
Nov 1st, 2014
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. -(void)checkLoginStatus
  2. {
  3. NSUserDefaults *pref=[NSUserDefaults standardUserDefaults];
  4. NSString *userId=[pref objectForKey:@"user_id"];
  5. if(userId!=nil)
  6. {
  7. UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"Already Logged in!" message:@"You are already logged in." delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
  8. [alert show];
  9. }
  10. else{
  11. UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"please log in first!" message:@"You are not logged in." delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
  12. [alert show];
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement