Beginner of UITableView-Beginner of uitableview
We usually watch video learning as a way to improve the efficiency of our own scholars. However, sometimes, after watching the video, when we write it on our own, it will always show that the effect of the version is different. This is different from the bug, which is too confusing:
Today, he told me that UITableView inherits the parent class UIScrollView of the sliding view, which has a non-simple hierarchical structure. In a UIScrollView, it is divided into the tableHeaderView and tableFooterView. It also contains a section view... The final look at the layering is still simple, and the new version is always the most detailed, in earlier versions, the color of the UITableView object and the entire section of the image are displayed, however, in the new ios8, if the color and image of UITableView are set to the bottom layer, the section is still displayed in white ,,,,
This is based on the hierarchy in the middle of the UITableView. The lowest layer is the view of the UITableView, and on the upper layer is a section view. Its default color is white, the upper layer is cell, but when you tap the code, you only set the UITableView color and the picture. Naturally, the upper layer will overwrite it. Set the section or cell color to clear.
For example:
Static NSString * cellIndentity = @ "cell ";
UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier: cellIndentity];
If (cell = nil ){
Cell = [[UITableViewCell alloc] initWithStyle: UITableViewCellStyleDefault reuseIdentifier: cellIndentity];
}
Cell. backgroundColor = [UIColor clearColor];
Well, this is just a problem that will be written later.