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