Exception occurs: -[UITabBarController setUserAccount:]: unrecognized selector sent to instance.

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITabBarController setUserAccount:]: unrecognized selector sent to instance. enter image description here 1. I have totally 4 view controllers in my xcode project.
First view controller is LoginViewController and Second View controller is DialPad ViewController and third is
Contact ViewController and fourth is callHistory viewController.

  1. Now, I want to merge last three viewControllers as one view by adding Tab bar controller. I have successfully added tab bar controller, but it gives above exception. I clearly found that where is the exception occurs, but don't know how to clear it.

  2. In LoginViewController, When user logins with using username and password, its first checks username and password correct. If both are correct means it enters into next view controller, else it stays in same Login ViewController.

For this function, I have used

-(BOOL) shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender
{

    if([self checkLogin])
    {
       return YES;
    }
    else
    {
       return NO;
    }
}

Now when return YES means, it goes to Tab Bar Controller, and it gives exception.

Please give any other solution to solve this problem.

Thanks in Advance.

0

There are 0 answers