title: Button Image Change button click and then go to next Subview
body: <p>this is my second question here.</p>
  
  <p>I have button. When I press it I want to go to "next screen". Another SubView. But also when button is pressed I would like to change its image. I wrote some code but when I press button next View is open but image button doesn't change. when I come back to first view by some other button image is changed. please help.</p>
  
  <pre><code>- (IBAction)kotlista:(id)sender{ 
      [kotzlisty setImage:[UIImage imageNamed:@"pies.png"]  forState:UIControlStateSelected]; //current image is kot.png, I want to change it for pies.png
      [NSThread sleepForTimeInterval:1.0]; //show icon with new image for second
      [lista removeFromSuperview]; //then close lista view
      [self addSubview:kotek]; //and then open kotek view
  }
  </code></pre>