1. Hover effect
http://blog.csdn.net/liangyc0129/article/details/51781722
The main reference for this blog, using JHHeaderFlowLayout.h. You can generate Uicollectionreusableview.
Jhheaderflowlayout *layout = [[Jhheaderflowlayout alloc] init]; 0 ; Ten ; = Uiedgeinsetsmake (kleftspace, Kleftspace, Kleftspace, kleftspace); // Naviheight Determining the height of the top suspension Layout.naviheight = Knav_height;
2. Top similar Tableviewheaderview effect
http://blog.csdn.net/wangyanchang21/article/details/51734750
Refer to this blog post. When there is a top set of Carousel diagram, suspended Headerview on the view effect, TableView have Tableviewheaderview,collectionview is not,
So change the inner Yanbian distance of the CollectionView, add the picture in the space of the inner extension blank.
// 1. Set CollectionView contentinset 0 0 0 ); // 2. Fill the picture view UIView *topview = [[UIView alloc]initwithframe:cgrectmake (0,-topimg_height, Kscreenw, Topimg_height)];< C10/>[self.collectionview Addsubview:topview];
Note: This method is feasible, but in the case of both effects need to pay attention to CollectionView Contentoffset, after adding the header, Contentoffset at this time is-topimg_height.
Ios--collectionview Add top hover effects for Tableviewheaderview and Sectionheader similar to TableView