简体   繁体   中英

UITableView separator does not appear correctly in iOS7

I'm a beginner in iOS developement and I try to make an e-catalogue. I use a custom splitView to display the products list and in the masterView's the separator of my tableView does not appear correctly…

图片的问题

I already tried to solve the problem by setting the separator inset to 0 but it didn't work.

Have you an idea of what I'm supposed to do ?

[EDIT]

Currently I use the solution of putting a CALayer at the bottom of my cell (the code below is write in "CellForRowAtIndexPath"

CALayer *produitsCategorieCellBottomBorder = [CALayer layer];
produitsCategorieCellBottomBorder.frame = CGRectMake(15, cell.frame.size.height-1, 320, 1.0f);
produitsCategorieCellBottomBorder.backgroundColor = [UIColor colorWithRed:198/255.0 green:197/255.0 blue:204/255.0 alpha:1.0].CGColor;
[cell.layer addSublayer:produitsCategorieCellBottomBorder];

If you find a better solution tell me PLEASE :)

[EDIT]

It looks like the custom views you are adding to the cell are overlapping the separator. Check their frames, and set the label backgrounds to [UIColor clearColor] .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM