Today to do the company's products encountered a title problem, troubled me for a long time, exhausted various methods can not be solved, the reason why, the custom cell low-end has a view line, the line is generally displayed 1 pixels, and the section of the display rarely at most 0.3 pixels, the problem is very headache, and later Think of a very good solution:
uiimageview *separatorline = [[ uiimageview alloc]initwithframe< Span class= "S1" >:cgrectmake (20.0f* sizescalex,30*sizescaley< Span class= "S1" > -1.0f Frame. Size. Width,1.0f)];
Separatorline. image = [[UIImageimagenamed:@ " all backgrounds . png"] Stretchableimagewithleftcapwidth:1topcapheight:0];
Separatorline. tag =5554;
[Cell. Contentviewaddsubview: separatorline];
To judge again.
if(Indexpath. Row = = arr.Count-1) {
uiimageview *separatorline = (uiimageview *) [cellviewwithtag:5554];
Separatorline. Hidden =YES;
}Else{
uiimageview *separatorline = (uiimageview *) [cellviewwithtag:5554];
Separatorline. Hidden =NO;
}
IOS Tableviewcell plane format, close to section edge does not show split line but is reused workaround