Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Black corners on UITableView Group Style

I have a problem where my UITableView (group style) has a black "tip" above it's rounded corner.

I'm setting up the background of the tableview like so:

[meetingTableView setBackgroundColor:[[UIColor alloc] initWithPatternImage:[[UIImage alloc] initWithContentsOfFile:@"background.png"]]];

And my table view ends up looking like this:

black pointy edge on rounded corner http://papernapkin.org/pastebin/resource/images/imageEntryId/6487

Any ideas how I can get rid of those black points?

like image 730
ThaDon Avatar asked Oct 13 '09 01:10

ThaDon


5 Answers

I have got the same problem. When I set clear color by xib, I have the back corner The solution is to set it by code !

(The same problem with interface builder exist for webviews)

like image 137
Amine Avatar answered Oct 20 '22 18:10

Amine


Try this in your controller's viewDidLoad method:

meetingTableView.backgroundColor = [UIColor clearColor];
like image 26
Imran Raheem Avatar answered Oct 20 '22 17:10

Imran Raheem


You'll get Black corners on UITableView Group Style if you set background color to clear color in XIB.

Instead try this code for removing Black corners on UITableView Group Style

tableViewObject.backgroundColor=[UIColor clearColor];

like image 26
surendher Avatar answered Oct 20 '22 17:10

surendher


Just in case you weren't already aware, there's another neat technique you can use to make customized backgrounds for UITableViews:

Not quite as simple as setting the background as you're doing, but it gives you a lot more flexibility and can scale to any table size.

like image 20
Ray Wenderlich Avatar answered Oct 20 '22 17:10

Ray Wenderlich


Maybe if you put yourTableViewOutlet.backgroundView=nil;

like image 23
esses77 Avatar answered Oct 20 '22 19:10

esses77