IOS Learning Note--0009 (about TableView)

Source: Internet
Author: User

1.

  First recommend a third-party library Mjrefresh/mjrefresh.h,github ranked third I believe that many people are familiar with, really good

2.

For the structure of tableview here is not too much to explain, their own header,footer, each section corresponding to the Header,footer, the original cell, custom cell, etc. should be very understanding

3. Focus:

Recent work encountered in the demand is this, need two section, but the first section inside the cell does not need to slide line, to the Internet to find n many methods, most of which is to rewrite the DrawRect method, but later I found a more

A simple way to share this:

[Cell setseparatorinset:uiedgeinsetsmake(0, 0, 0, 1000000)];

There is a reloaddata problem, this is the need to reload specify the section of the data (why this is not too much to describe here), OK, the way is:

[self. TableView reloadsections: [nsindexset indexsetwithindex:1] Withrowanimation:uitableviewrowanimationnone]; cell with reload section 1 alone

Another requirement for a variety of reasons, I customized a cell, left and right equal, inside put a bunch of pictures, Label,button and so on, then how to go

-(uitableviewcell *) TableView: (uitableview *) TableView Cellforrowatindexpath: (nsindexpath *) Indexpath

It? Haha, that's what I'm dealing with. The index to the right of the Indexpath.row * 2 index is indexpath.row * 2 + 1 So you can get the corresponding data from the array.

Then is the Click event Processing, which button is clicked? My solution is to add a tag value for each button (the tag value is best >1000, reason please Baidu), and then according to tag to get the corresponding button, and then to deal with business logic

Still working overtime ... Just write about it first ...

IOS Learning Note--0009 (about TableView)

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.