UITableView separator not hiding for you? Here's why.

So I was having "fun" with UITableView trying to skin a TableView for smackBOT's multiplayer lobby. We're using a grahical separator and so I happily set the separatorStyle to UITableViewCellSeparatorStyleNone. Compile, build and run.....  and yes, the separator is still there. What's going on?

I google a little and checked the SDK docs in Xcode, every thing looks right. Customizing UITableView has been done before, it's nothing new. So what could be wrong?

Using my very analytical thinking (sorry if it sounds like I'm boosting), I looked through the UITableView properties and trying to make an "analytical" guess on what could have cause the separator being drawn even though the separatorStyle was set. Immediately, the UITableView style caught my attention. There's basically 2 different style you can have UITableView play, plain or group. I was using group and techncally it shouldn't have matter. However, in the world of software development, we can it a bug. So I set the UITableView style to plain and voila, it now works.

UITableView *tview = [[UITableView alloc] initWithFrame:CGRectMake(8, 125, 466, 180) style:UITableViewStylePlain];

So if you're having problems with "removing" the UIViewTableCell borders? That might be your problem. If you're UI design requires UITableViewStyleGroup, then I guess you're out of luck with hiding the separators without doing it in a hackish way.


Loading mentions Retweet
Filed under  //  game design   iphone sdk   leftright studios   smackbots  
Comments (0)
Posted 3 months ago