UIButtons from different views add images to same view?
<p>So, I am building an application with different views. Each of them has a number of buttons. When pressing a button in a view, it should add an image to a addedImages view (the main one).
How do I make a loop that will add the images dynamically according to the position of previously added images?
Im quite new in this, so now I have only one button adding an image like this:</p>

<pre><code>- (IBAction)addItemToShoppingList
{
    UIImage *image = [UIImage imageNamed:@"button1.jpg"];
    UIImageView *imageView = [[UIImageView alloc]initWithImage:image];
    imageView.frame = CGRectMake(120, 100, 80, 80);
    [shoppingList.view addSubview:imageView];
    [imageView release];

}
</code></pre>

<p>So I wanna make a function addItemToShoppingList that will be associated to all buttons in different views but to put different images dynamically to the same one?</p>
