Skip to content
项目

Cuberto/smooth-scroll has 699 GitHub stars and 68 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-20 04:25 UTC. Last push 2018-12-21.

这些数字如何统计

实测星标增长

24小时
0
7天
正在收集历史
15天
正在收集历史
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

关于

Smooth collection scrolling

开发工具

README.md

原文

Cuberto's development lab:

Cuberto is a leading digital agency with solid design and development expertise. We build mobile and web products for startups. Drop us a line.

SmoothScroll

Animation

Example

To run the example project, clone the repo and run AnimatedCollection.xcodeproj

Requirements

  • iOS 11.0+
  • Xcode 10.0

Installation

Add SmoothScroll folder to your project

Usage

  1. Create a new UICollectionView in your storyboard or nib (or instantiate it from code).

  2. Set layout to Custom and set its class to CBSmoothScrollLayout

  3. Register supplemetary views for Header, Menu and Title of kinds

  • CBSmoothScrollLayout.kCBAnimatedLayoutHeader
  • CBSmoothScrollLayout.kCBAnimatedLayoutMenu
  • CBSmoothScrollLayout.kCBAnimatedLayoutTitle respectively
  1. Check your collection view delegate to return right views from method collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath)

  2. Check your collection view delegate to conform UICollectionViewSmoothScrollLayoutDelegate protocol to provide correct size of title and handle animation progress

  3. Customize cells and supplementary views for your own purposes. You are free to inherit from base classes provided by us, or create your own from scratch

You can use provided CBViewAnimator to propagate animation state to all views that conforms to CBAnimatable protocol. Just register views to animator and call updateAnimation(toProgress progress: CGFloat) from delegate. All parts of layout can be tuned by changing params of CBSmoothScrollLayout

Author

Cuberto Design, [email protected]

License

SmoothScroll is available under the MIT license. See the LICENSE file for more info.