Wednesday 18 July 2012

Login Coding in iOS

-(IBAction)login:(id)sender
{
    NSString *user=username.text;
    NSString *pass=password.text;
    NSString *name=@"asan";
    NSString *word=@"111";
    
    if ([user isEqual:name]&&[pass isEqual:word]) 
    {
       /* Sentient *som=[[Sentient alloc]init];
        [self.navigationController pushViewController:som animated:YES];*/
        
    }
   else
   {
       UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"LoginFailed" 
       message:@"password Mismatch" delegate:nil cancelButtonTitle:@"ok" otherButtonTitles: nil];
       [alert show];
       [alert release];
   }
}

No comments: