Relating UIButton
===

I am building a sort of check sheet with many uibuttons, that I am adding using code (not IB).  I would like to have it that when certain buttons are selected, other buttons cannot be selected.  For example, I have one row of buttons that will be LOW, MEDIUM, HIGH.  I don't want it to be possible for the user to select 2 of the options (if they want to change their choice thats fine, just no 2 at a time).

I know the general structure of my methods, and here is what I have so far:

`-(void)addButtons` This is where I will populate the view with buttons (just showing one button here but there are many):

    -(void)addButtons{
    
        UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
        [button addTarget:self action:@selector(clicked:) forControlEvents:UIControlEventTouchUpInside];
        [button setTitle:@"" forState:UIControlStateNormal];
        button.frame = CGRectMake(209, 54, 127, 18);
        button.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
        [imageView addSubview:button];
        
    }

---

`-(void)clicked:(UIButton *)sender`  This is the method that will be called when a button is clicked.  I want it to submit itself as a parameter.  The button will then change its appearance to signify it has been clicked.  The reason I am making it transparent is because I have the buttons on top of an image and you need to see what underneath them.  I also don't think `sender.backgroundColor = [UIColor redColor];` will work like I want it to but thats beside the point.

    -(void)clicked:(UIButton *)sender{
        
        sender.alpha = 0.5;
        sender.backgroundColor = [UIColor redColor];
        
        [self setRelatedButtons:sender];
        
    }

---

`-(void)setRelatedButtons'`  And this is the method where I will ensure that only one button per 'set' is selected

    -(void)setRelatedButtons:(UIButton *)sender{
        
        //since I know this button is clicked
        //set related buttons to unclicked
        
    }

---


**To sum up everything**, here is what I am wondering:

1)  How can I set a button's appearance to stay selected ?

2)  What should I pass to my `clicked` and `setRelatedButtons` methods to identify the current button?  Right now I have the button itself but is there something better?

3)  What is the best way to relate certain buttons?  I could use an array for each set of buttons, but I hope there is better way.  Could I potentially use a `typedef` ? (never used one of those before)

