루프 메시지:?Instant Communication Debug

1418 단어
로그인

- (IBAction)loginBtn:(id)sender {
    
    EMError * error = [[EMClient sharedClient ] loginWithUsername:self.usernameTF.text password:self.passwordTF.text ];
//    EMError * error = [[EMClient sharedClient ] registerWithUsername:self.usernameTF.text password:self.passwordTF.text ];        loginWithUsername
    if (!error){
        
        NSLog(@" ");
        
        
       [[EMClient sharedClient].options setIsAutoLogin:YES];
        
        
        
        UIStoryboard * storyboard = [UIStoryboard storyboardWithName: @"Main" bundle:[NSBundle mainBundle ] ];
//         UIStoryboard * storyboard = [UIStoryboard storyboardWithName: @"main" bundle:[NSBundle mainBundle ] ];               main 
        
        
        UITabBarController * tbc = [storyboard instantiateViewControllerWithIdentifier: @"tabbar" ];
        
        [self presentViewController: tbc animated: YES completion:^{  }];
        
        
    }else{
    
    
        NSLog(error);
    
    }
    
    



}

등록
- (IBAction)registerBtn:(id)sender {
    

    EMError * error = [[EMClient sharedClient ] registerWithUsername:self.usernameTF.text password:self.passwordTF.text ];
    
    
    if (error == nil){
    
        NSLog(@" ");
    
    
    }else{
        
        
        NSLog(error);
        
    }
    
    
    
}



좋은 웹페이지 즐겨찾기