IOS tips and tips

Source: Internet
Author: User

IOS tips and tips

  • The following problems are all encountered by myself in the project. There are certainly many ways to solve the problem. What I list is not necessarily the best solution. If you have any questions, please let us know, add, and communicate with you.

 

 

// Sometimes the list implemented by UITableView uses section, but does not want it to stick to the top but disappears or appears as a scroll (void) scrollViewDidScroll :( UIScrollView *) scrollView {if (scrollView ==_tableview) {CGFloat sectionHeaderHeight = 36; if (scrollView. contentOffset. y <= sectionHeaderHeight & scrollView. contentOffset. y> = 0) {scrollView. contentInset = UIEdgeInsetsMake (-scrollView. contentOffset. y, 0, 0, 0);} else if (scrollView. contentOffset. y> = sectionHeaderHeight) {scrollView. contentInset = UIEdgeInsetsMake (-sectionHeaderHeight, 0, 0, 0 );}}}



Text/Simba_LX (simplified author)
Link: http://www.jianshu.com/p/970469cb0428
Copyright belongs to the author. For reprinted content, contact the author for authorization and mark "author of simplified book ".

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.