Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>you have bugs in your code try to use this, i assume this code is for testing and you should change the login check not as you typed <strong>loginCheck = !loginCheck;</strong> follow the below code it will fix your issue for this code</p> <pre><code>- (void) loginPressed { if (loginCheck) { self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Logout" style:UIBarButtonItemStyleBordered target:self action:@selector(loginPressed)]; popImageView.hidden=NO; passwordLabel.hidden=NO; userLabel.hidden=NO; userNameTextField.hidden=NO; userPasswordTextField.hidden=NO; signInButton.hidden=NO; tableView.hidden=YES; } else { self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Login" style:UIBarButtonItemStyleBordered target:self action:@selector(loginPressed)]; popImageView.hidden=YES; passwordLabel.hidden=YES; userLabel.hidden=YES; userNameTextField.hidden=YES; userPasswordTextField.hidden=YES; signInButton.hidden=YES; tableView.hidden=NO; } loginCheck = !loginCheck; } - (void)viewWillAppear:(BOOL)animated { if (loginCheck) { self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Login" style:UIBarButtonItemStyleBordered target:self action:@selector(loginPressed)]; } else { self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Log out" style:UIBarButtonItemStyleBordered target:self action:@selector(loginPressed)]; } self.title=@"Activity"; [super viewWillAppear:animated]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload