zoukankan      html  css  js  c++  java
  • [翻译] MJParallaxCollectionView

    MJParallaxCollectionView

    https://github.com/mayuur/MJParallaxCollectionView

    This is a parallax for the cells inside UICollectionView. It gives us an effect just like scrolling the images in Whatsapp or scrolling through the Weather app for iOS.

    这是一个cell的视差效果控件,用于UICollectionView当中。你可以在Whatsapp以及Weather app中查看到这种效果。

    Setting it up is really simple.

    设置非常简单。

    1. Just create a NSString array contaning all the names for the images. 设置一个带有图片名字的字符串数组
    2. Set up the Collection View datasource and delegate methods. 设置CollectionView的datasource以及delegate代理方法
    3. Set the scrollViewDidScroll delegate method for your UICollectionView. 给你的UICollectionView设置scrollViewDidScroll的代理方法
    4. That's it. Now run! 就酱紫,直接运行吧!

    Optionally, you can change the animation speed for the images or the height of the images in the UICollectionViewCell by chnaging the constants used in MJCollectionViewCell.h

    作为一个额外的操作(但不是必须的),你可以修改图片动画的速度,也可以在 MJCollectionViewCell.h 文件中修改图片的图片的高度。

    Thanks!

    Follow me or ask questions or just say Hi! at Twitter : @mayuur

    Watch the demo below

  • 相关阅读:
    使用Mint-UI的Loadmore实现上拉加载更多和下拉刷新
    JavaScript的日常所得
    web网站性能优化整理
    ArrayBuffer
    Blob
    FormData
    FileReader
    websocket的实践
    Vue CLI 3的Vue.config.js
    css行高line-height的一些深入理解及应用
  • 原文地址:https://www.cnblogs.com/YouXianMing/p/4564736.html
Copyright © 2011-2022 走看看