title: iOS: change subview with segmented control
body: <p>I have four subview and when I select (segment ==1) in segmented control other view must have alpha at 0.00 and only subview number 1 must have alpha at 1.00, I show my code:</p>
  
  <pre><code>if (segmentedContr.selectedSegmentIndex == 1) {
  
      [subView1 setAlpha:0.0];
  
        }
  </code></pre>
  
  <p>it's simple, but where I must write this code? In an IBAction? or in a generic method (void)? If I do</p>
  
  <pre><code>-(void)segmentAction:(id)sender
  </code></pre>
  
  <p>where I must call this method?</p>