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 = Cgsizemake (.); Horizontal sliding self.scrolldirection = uicollectionviewscrolldirectionhorizontal; Upper left lower right four offset Self.sectioninset = Uiedgeinsetsmake (+, ten, ten); The spacing 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