[IOS development-62] custom cell make group purchase page, top picture carousel, bottom simulation load more functions, the core is to practice proxy mode, ios-62

Source: Internet
Author: User

[IOS development-62] custom cell make group purchase page, top picture carousel, bottom simulation load more functions, the core is to practice proxy mode, ios-62

(1) Effect



(2) free source code download

Group Buying page + iOS source code + Head Advertisement carousel + more loading at the bottom


Download plist data files and image resources (if the operation prompts that data is missing, you can drag the data plist and other files to overwrite the original one)


(3) Supplement

In the source code, there is a flaw: because it is a single thread, when the page is dragged up or down, the image carousel will stop. Therefore, we need to take into consideration the problem. The solution adds the timer to the current runLoop.

Add a line of code to the playOn method of WPTgHeaderView. m:

-(Void) playOn {timer = [NSTimer scheduledTimerWithTimeInterval: 2.0 target: self selector: @ selector (nextImage) userInfo: nil repeats: YES]; // when dragging up or down, the image can still be carousel, that is, the timer can still work. Because it is a single thread, you need to add the timer to the current runLoop [[nsunloop currentRunLoop] addTimer: timer forMode: nsunloopcommonmodes];}

(4) Summary of knowledge points:

-- Skillful Use of tableView, including reloading data.

-- Proficiency in using xib for custom cells.

-- Intermediate requirements such as clear MVC code classification and code encapsulation.

-- Some sporadic knowledge, skillful use of scrollView and Protocol methods in the slideshow effect; display and hide effects when loading more.





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.