简体   繁体   中英

Increase uicollectionview cell size when it is selected in iOS

I am doing an application where I need to increase/zoom collection view cell. I am giving link to image. I need to implement similar to the image given below. Please help me someone. Thanks in advance.

http://40.media.tumblr.com/e338d087cdd7e26b4ceda7129ae33987/tumblr_njh29zUfwA1r2wjwko6_1280.png

In your current scenario, I don't think there is any need to change the cell size on tap. You can play with your view's (inside cell) frame.

  1. Just create the cell with the same size equal to the selected cell size .
  2. Make the background of the cell clear color.
  3. In non-selected state, make the view's y around 25 pixels lower and hide that horizontal line .
  4. On selection, stretch the view's y to around 20 pixels upper side, show that horizontal line and change the height accordingly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM