Reputation: 1425
For a UITableViewStyleGrouped
UITableView
a small extra line is drawn below the tableview
How do I fix this?
I have tried my best. No luck so far.
Thank's in advance.
My Code
-(void)myTableView
{
// if(mytableView != nil)
// [mytableView release];
if (mytableView == nil) {
mytableView = [[UITableView alloc]initWithFrame:myFrame style:UITableViewStyleGrouped];
}
mytableView.delegate=self;
mytableView.dataSource=self;
mytableView.backgroundView=nil;
mytableView.scrollEnabled = FALSE;
[self.view addSubview:mytableView];
[self myPortraitMode];
}
Background of the table is fixed is an image.
Upvotes: 1
Views: 923
Reputation: 988
I think what you are referring to is the Bevel color of the table view.
The answer is in this post.
Basically, you need to set the table separatorStyle
to UITableViewCellSeparatorStyleNone
or to UITableViewCellSeparatorStyleSingleLine
.
Upvotes: 2
Reputation: 15376
You need to set a background view:
UIView *backgroundView = [[UIView alloc] init];
backgroundView.backgroundColor = [UIColor yourColor];
tableview.backgroundView = backgroundView;
[backgroundView release];
You don't need to set the properties every time.
-(void)myTableView
{
if (mytableView == nil) {
mytableView = [[UITableView alloc]initWithFrame:myFrame style:UITableViewStyleGrouped];
mytableView.delegate=self;
mytableView.dataSource=self;
mytableView.backgroundView=nil;
mytableView.scrollEnabled = NO;
[self.view addSubview:mytableView];
[self myPortraitMode];
}
}
I don't really see what the problem is though.
Upvotes: 1