IOS8 uicollectionview Transverse Slide Demo

Source: Internet
Author: User

In IOS8, there is a conflict between ScrollView and the click event loaded on it, so the best choice to make a horizontal sliding interface is uicollectionview.

The effect can be modified by Apple's official demo, Https://github.com/SeniorZhai/LineLayout.

The main introduction involves several attributes, in the LINELAYOUT.M file:

 // cell size  self.itemsize = CGS Izemake (200 , 250         );  //  horizontal swipe  self.scrolldirection =< Span style= "color: #000000;"        > Uicollectionviewscrolldirectionhorizontal;  //  top left and bottom right four offsets  Self.sectioninset = Uiedgeinsetsmake (100 , 10 , 200 , 10  );         //  space between each cell  self.minimuminteritemspacing = 10.0 ; 

In LINELAYOUT.M-(nsarray*)layoutattributesforelementsinrect:(cgrect) Rect This method is commented out, he is sliding when the item has a magnified animation effect.

The rest is not burdensome, please test it yourself.

IOS8 uicollectionview Transverse Slide Demo

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.