solve :

One , When using tableview The format is group when

1. First set up

tableview.sectionHeaderHeight = 0.00001;

tableview.sectionFooterHeight = 0.000001;

2. Write the required height in the proxy method

-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section

{

return 5;

}

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section

{

return 5;

}

3. If you want to set the head view separately Or tail view It can be written as follows

// Set only the tail view No head view is needed

-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section

{

return 5;

}

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section

{

return 0.0001;

}

Two : Generally not used group, Except to limit the head and tail view to follow tableview And when you slide

Original works , Please leave a message if you have any questions , thank you ....

iOS tableview group When the head and tail view interval size of more related articles

  1. iOS - (TableView Using the system in cell Set up cell.textlabel Location and size )

    Today, I have a little problem in my work , In the demand effect TableView cell Medium Label The font size is larger than the original system and Label It's not in the front , But back in the middle , For the first time, I also want to ...

  2. iOS tableview Optimization summary

    According to the optimization methods on the network, it is summarized . No careful language organization . Learning from these optimization methods , See another article Improve app Fluency 1.cell The child control is created and written in initWithStyle:reuseIdentifier ...

  3. iOS Development of multi table view sliding switch example ( Imitation " headlines " client )--- Optimization

    I published an article a few days ago iOS Development of multi table view sliding switch example ( Imitation " headlines " client ) The blog of , I wrote this blog , It's because of a iOS The beginner asked a question , I wrote a simple demo Made a demonstration , Let it expand on the foundation ...

  4. iOS series The basic chapter 05 The ancestor of the view - UIView

    iOS series The basic chapter 05 The ancestor of the view - UIView Catalog : UIView“ family ” The construction level of application interface View classification Last stay Cocoa and Cocoa Touch In the frame ,“ root ” Class time NSObject class . Again , ...

  5. iOS TableView Multilevel list

    The code address is as follows :http://www.demodashi.com/demo/15006.html Results the preview ### One . demand TableView Multilevel list : Expand or merge hierarchically , Get and display the sub level data step by step , Can be set ...

  6. iOS tableview Common use of delegate and dataSource Execution order

    In this project, we met a special problem : Table view created by cell stay 7 The above system can operate normally , It doesn't work on the simulator ...... To solve this problem , For a long time ...... Yes 7 Guess not shown on the system : use mas ...

  7. iOS Appears when the package is exported Missing iOS Distribution signing

    iOS Appears when the package is exported Missing iOS Distribution signing Upload APP It just shows up Missing iOS Distribution signing indetity for pack i ...

  8. ios tableview add textfiled

    ios tableview add textfiled First of all, I'd like to attach some pictures that I used in my project   And explain my usage : chart 1: chart 2: chart 3: My heart is in you   My original realization Method , I hope I can give you some   Qi ...

  9. 【 original 】 Repair ios Input box does not support... When getting focus fixed Of bug

    The other day , Did a mobile station project , There's a page like this , There is a fixed (position:fixed) Head and bottom navigation , In the middle are some form contents , Nothing special . But here we are ios in , There is no problem scrolling the page normally , Once the text is triggered ...

Random recommendation

  1. ajax XML

    <script src="jquery-1.11.2.min.js"></script> </head> <body> <se ...

  2. SuperGridControl Use tips

    1. According to the line Numbers superGridControl1.PrimaryGrid.ShowRowGridIndex = true; 2. Allows you to adjust the width of the line header superGridControl1.PrimaryG ...

  3. Android(java) Learning notes 64: Thread control

    1. Thread to sleep : Java Thread hibernation means that a running thread is suspended for a period of time , Go into blocking mode , By calling Thread Class static methods sleep Has been achieved . When a thread calls sleep After entering the blocking state , During its dormancy , This thread ...

  4. memcahced to update

    memcahc characteristic : stay Memcached Can be saved in item There is no limit to the amount of data , As long as there's enough memory . Memcached Single process in 32 The maximum memory used in bit system is 2G, If in 64 The bit system has no limits , This is because 32 position ...

  5. 【Android】 onSaveInstanceState() Restore data

    onSaveInstanceState() Method will carry a Bundle Parameters of type ,Bundle Provides a series of methods for saving data , You can use putString() Method to save a string , Use putInt ...

  6. db2 Common configuration

    db2set To configure : db2set DB2_ENABLE_LDAP=NO db2set DB2_ALTERNATE_GROUP_LOOKUP=GETGROUPLIST db2set DB2_RESTOR ...

  7. initial jvm( One )---jvm Memory area and overflow

    jvm Memory area and overflow Why study jvm The principle of planking , The shortest board determines the depth of a water , When a system garbage collection becomes a bottleneck , Then you need to know jvm To understand and master . When a system runs out of memory , When memory leaks , Because you know jv ...

  8. Text domain 、bootstrap-table Display and MySQL The problem of line breaks between them

    First , One of the problems I encountered in the project today , How to realize text input line feed and in the foreground Bootstrap-table It can also wrap lines . Maybe you'll immediately think of saying , With a rich text editor , However, all we need to achieve is text input and line feed ...

  9. Linux Cloud server installation Elasticsearch

    install Elasticsearch notes : My server is CentOS7.3 Mirror image 1. download JDK In the installation JDK You need to check whether other versions already exist JDK. Use the following command to view the existing JDK edition : java -ver ...

  10. React state state

    <!DOCTYPE html><html><head lang="en"> <meta charset="UTF-8" ...