One, experience
1> Custom plain-style tableview, the splitter line is not displayed on the emulator, but the split line below the cell is displayed on the real machine.
2> attempted to use the Separatorstyle property of the table, attempting to fail. Try using a table of type grouped, set the proxy method for Headerview and Footview, or The Tablefooterview property does not take effect.
3> colleague location to the problem should be, has set the Separatorstyle property, and then by some of the system's properties are overwritten, and no data cells are automatically created by the system.
4> colleagues then let me ① in Viewdidappear and other methods to reset the Separatorstyle property, and ② to set the Tablefooterview property to a normal UIView control, the result is really successful.
The code is as follows:
1 -(void) layoutsubviews{2 [Super layoutsubviews]; 3 // Reset Split Line 4 Self.separatorstyle = Uitableviewcellseparatorstylenone; 5 }
1 // Add the following statement to the construction method or Viewdidload method 2 Self.tablefooterview = [[UIView alloc]initwithframe:cgrectmake (0011)] ;
Second, Experience summary
1> whatever the bug, try to think about the cause. This bug is probably due to the fact that the system continues to create the remaining unused cells as a tablefooterview.
2> Multi-analysis, can improve their ability.
Custom plain style tableview, the splitter line is not displayed on the simulator, but the split line is displayed on the real machine.