Q:

Get the view a UIButton is on

I have a UIButton on a Custom UITableViewCell, i have a method "done".
How can i get the CustomTableViewCell via the Button?
-(IBAction)done:(id)sender {
    (CustmCell((UIButton)sender).viewTheButtonIsOn...).action
}

A:

The answer by CodaFi is most likely enough but it does make the assumption that the button is added directly to the table cell. A slightly more complicated but safer bit of code could be something like:
-(IBAction)done:(id)sender {
    UIView *parent = [sender superview];
    while (parent && ![parent isKindOfClass:[CustomCell class]]) {
        parent = parent.superview;
    }

    CustomCell *cell = (CustomCell *)parent;
    [cell someAction];
}

A:

If it is added directly to the cell as a subview, you can use -superview to get it's parent view.  Also, you need to cast with pointers because objects are never taken by value, only pointed to in Objective-C.
-(IBAction)done:(id)sender {
    [(CustmCell*)[(UIButton*)sender superview]someAction];
}

