We'll show you what we're going to do here.
As you can see, it's a list of clicks to separate. Just like QQ's friend Bar. So the first question is what are these groups? The second question is of course how to achieve this function?
So we're going to go through the code with a thin analysis
First of all, this list is, of course, head-view Tula. The effect of clicking here is of course a button pull and in order to make the word alignment I've added another lable here. The specific code is as follows:
Set these up. If we add content to the cell, we'll have the effect of what we'll do, and then we'll achieve the effect of clicking Indent, and here's a very simple way to do it because the number of cells in each group is changed after the click, so we can set two states. One is the display array one is not the display number Group. That is, the number of cells with a cell number is zero code as follows
First, create a global array of bool arrays with a little bit more because you don't know how many groups you have to record your cell status in this group.
It then determines its state when the number of cells is returned:
To determine the number of cells in this group
In the end, of course, when the button is clicked, changing the corresponding state of the clicked Group in the BOOL array is not easy to refresh the group.
iOS development The effect of making QQ Buddy bar through Uitableviewcontroller