title: How can I hide a button in a different view controller?
body: <p>I am using this code to hide a button in a different view controller, but the button does not get hidden when the button is pressed to hide the button in the other view controller.</p>
  
  <p>This is the code I am using to hide the button in the other view controller:</p>
  
  <pre><code>    [self dismissModalViewControllerAnimated:YES];
  
      NSLog(@"Exited");
  
      ViewController *vc = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
  
      [vc.mainbutton1 setHidden:YES];
  </code></pre>
  
  <p>Why is this not working?</p>
  
  <p>Thanks!</p>