So let's say I have a viewController
view and a popup UITableView
table.
I want to be able to change the background view of the viewController
that calls the pop-up table by selecting an option from the table.
So what I want to do is the following:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
int selectedEntry = indexPath.row;
switch(selectedEntry){
case 1:
//CODE TO CHANGE ORIGINAL VIEW TO IMAGE 1
case 2:
//CODE TO CHANGE ORIGINAL VIEW TO IMAGE 2
//etc
}
}
I already know that if I was writing the method directly in the base view class I could just write
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"IMAGE"]];
but since it's being called from the popup menu, I don't know how to access it.