title: Calling a method of One View controller from Another View Controller
body: <p>I have a method "someMethod" declared in OneViewController.h </p>
  
  <pre><code>@interface OneViewController
  {
  UIView *tempView;
  ..
  
  }
  -(void) someMethod ;
  @end
  </code></pre>
  
  <p>and implemented in OneViewController.m file</p>
  
  <pre><code>@implementation OneViewController
  
  -(void) someMethod 
  {
  tempView = [[UIView alloc]initWithFrame:CGRectMake(100, 50, 200, 250)];
  tempView.backgroundColor = [UIColor yellowColor];
  if([[self.view subviews] containsObject:tempView])
  [tempView removeFromSuperView];
     else
     [self.view addsubview:tempView];
  
  }
  </code></pre>
  
  <p>I want to call <em>someMethod</em> when present at different viewController - secondViewController</p>
  
  <p>(something like <code>[OneViewController someMethod]</code>), So that when I get back to OneViewController I can see the changes made by <em>someMethod</em>. </p>
  
  <p>Do I need to use appDelegate methods?</p>
  
  <p>I have tried following but it doesn't work. </p>
  
  <pre><code>neViewController *newViewController = [[OneViewController alloc] init];
  [newViewController someMethod];
  </code></pre>
  
  <p>Thanks for any help in advance..</p>