title: how to change uiimageview image's programmatically
body: <p>In my ios application i create uiimageviews programmatically like that,</p>
  
  <pre><code>for (int i=0; i&lt;20; i++) {
  
                                     productID=[products objectAtIndex:i];
  
                                     UIButton * button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
                                     [button setFrame:CGRectMake(column*197+38 , row*350+8, 159, 45)];
                                     //[button setImage:redButtonImage forState:UIControlStateNormal];
                                     [button addTarget:self
                                                action:@selector(buttonAction:)
                                      forControlEvents:UIControlEventTouchUpInside];
                                     button.tag = productID;
                                     [scrollView addSubview:button];
  
  
  
                                     UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(column*197+170, row*350+25, 13, 13)];
                                     imageView.tag=productID;
                                     UIImage *image = [UIImage imageNamed:@"redImage.png"];
                                     [imageView setImage:image];
                                     [scrollView addSubview:imageView];
  
  
                                 }
  </code></pre>
  
  <p>in my buttonActon, i want to change that uiimageview's image to another image. But i can not do that. Can anyone help me? Thank You.</p>