iOS development The effect of making QQ Buddy bar through Uitableviewcontroller

Source: Internet
Author: User

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

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.