Beginner of UITableView-Beginner of uitableview

Source: Internet
Author: User

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.

 

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.