UITableView minus gray-striped background

Discussion in 'Mac Programming' started by Sbrocket, Apr 10, 2008.

  1. macrumors 65816

    Sbrocket

    Joined:
    Jun 3, 2007
    Location:
    /dev/null
    #1
    Does anyone know how to implement a UITableView...but without the nasty grey-striped background view? I'm sure it looks nice in other apps but it really, REALLY doesn't match my UI design so far. A UITableView would be perfect for what I'm trying to do, though.

    Just to clarify, it would be a grouped UITableView (UITableViewStyleGrouped, not Plain)...I just want to get rid of the gray background and have it float where it normally would be but with transparency instead of gray stripeys.

    Any ideas (if you can tell what I'm saying here)? :p
     
  2. macrumors member

    Joined:
    Oct 26, 2007
    Location:
    [[NSLocation alloc] initWithCity: Chicago]
    #2
    Set your table view background color to what ever you want...

    Code:
        mainTableView.backgroundColor = [UIColor redColor];
    
     
  3. thread starter macrumors 65816

    Sbrocket

    Joined:
    Jun 3, 2007
    Location:
    /dev/null
    #3
    My MBP's logic board is shot right now so I can't test anything, but I do believe I tried that along with the other obvious options (UITableViewCell.backgroundView among them) and it didn't seem to do much. UITableView.backgroundColor wouldn't make much sense unless there's a [UIColor greyStripedColor]. :p
     
  4. macrumors member

    Joined:
    Oct 26, 2007
    Location:
    [[NSLocation alloc] initWithCity: Chicago]
    #4
    It does work, I just did it and there is a color for the grey

    Code:
    groupTableViewBackgroundColor
    
     
  5. macrumors regular

    Joined:
    Mar 17, 2008
    #5
    Im not sure that is a color but a style of TableView.. to get the other one it would be UITableViewStylePlain. (or something)
     
  6. thread starter macrumors 65816

    Sbrocket

    Joined:
    Jun 3, 2007
    Location:
    /dev/null
    #6
    I'll take a look at it when I get my development machine up and running again.
     
  7. thread starter macrumors 65816

    Sbrocket

    Joined:
    Jun 3, 2007
    Location:
    /dev/null
    #7
    Awesome, I can't believe I missed backgroundColor before...I could have sworn I tried that.

    Worked perfectly though. :eek:
     

Share This Page