[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6987":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":35,"readmeContent":36,"aiSummary":37,"trendingCount":16,"starSnapshotCount":16,"syncStatus":18,"lastSyncTime":38,"discoverSource":39},6987,"Gemini","shoheiyokoyama\u002FGemini","shoheiyokoyama","Gemini is rich scroll based animation framework for iOS, written in Swift.","https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=bPtq5E6lKzw&utm_content=bufferfa3fd&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer",null,"Swift",3310,199,52,15,0,1,2,28.9,"MIT License",false,"master",true,[25,26,27,28,29,30,31,32,33,34],"animation-3d","animation-effects","animation-library","carthage","cocoapods","ios","ios-animation","swift","swift-library","uicollectionview","2026-06-12 02:01:33","\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FAssets\u002Fblob\u002Fmaster\u002FGemini\u002Flogo.png\" width=\"500\">\n\u003C\u002Fp>\n\n# Overview\n\n\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FAssets\u002Fblob\u002Fmaster\u002FGemini\u002Fdemo-circle-rotation.gif\" align=\"left\">\n\n## What is the `Gemini`?\n\n`Gemini` is rich scroll based animation framework for iOS, written in Swift. You can easily use `GeminiCollectionView`, which is a subclass of `UICollectionView`.\n\nIt enables you to make multiple animation which has various and customizable properties, and moreover can create your own custom scroll animation. \n\n`Gemini` also provides a fluent interface based on method chaining. you can use this intuitively and simply.\n\n\n```swift\ncollectionView.gemini\n    .circleRotationAnimation()\n    .radius(400)\n    .rotateDirection(.clockwise)\n```\n\n# Features\n\n![Platform](http:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatform-ios-blue.svg?style=flat\n)\n[![Cocoapods](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCocoapods-compatible-brightgreen.svg)](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCocoapods-compatible-brightgreen.svg)\n[![Carthage compatible](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCarthage-Compatible-brightgreen.svg?style=flat)](https:\u002F\u002Fgithub.com\u002FCarthage\u002FCarthage)\n[![License](http:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-lightgrey.svg?style=flat\n)](http:\u002F\u002Fmit-license.org)\n![Swift](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fswift-5.0-orange.svg)\n![pod](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpod-v1.4.0-red.svg)\n\n\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FAssets\u002Fblob\u002Fmaster\u002FGemini\u002Fdemo-yaw-rotation.gif\" align=\"right\">\n\n- [x] Rich animation with scrolling\n- [x] Easily usable\n- [x] Highly customizable\n- [x] Several types of animations and properties\n- [x] Supports vertical and horizontal flow layout\n- [x] Supports easing function\n- [x] Supports `Swift5.0`\n- [x] Fluent interfaces based on method chaining\n- [x] Compatible with `Carthage`\n- [x] Compatible with `CocoaPods`\n- [x] Example project with lots of stock animations\n- [x] And More...\n\n# Contents\n- [Animation Types and properties](#animation-types)\n- [Usage](#usage)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Author](#author)\n\n# \u003Ca name=\"animation-types\"> Animation Types and properties\n\nThe following animation types are available. See sample code [here](https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FGemini\u002Ftree\u002Fmaster\u002FExample\u002FGemini) for details.\n\n- [Cube](#cube)\n- [Circle Rotation](#circle-rotation) You can configure direction of rotation using the `CircleRotationDirection`\n- [3D vector rotation](#3d-vector-rotation) Each rotation types provide multiple rotation effect\n  - [Roll Rotation](#roll-rotation)\n  - [Pitch Rotation](#pitch-rotation)\n  - [Yaw Rotation](#yaw-rotation)\n- [Scale](#scale)\n- [Custom](#custom) You can create your own custom scroll animation using multiple properties, rotation, scale, translation, etc.\n\nIn addition, you can also customize the following properties for the above animation types.\n\n- BackgroundColor\n- CornerRadius\n- Alpha\n- [Easings](#easing-function)\n- [Shadow Effect](#shadow-effect)\n\n## \u003Ca name=\"cube\"> Cube\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FAssets\u002Fblob\u002Fmaster\u002FGemini\u002Fcube-horizontal.gif\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FAssets\u002Fblob\u002Fmaster\u002FGemini\u002Fcube-vertical.gif\">\n\u003C\u002Fp>\n\nIt's a cube animation like Instagram.\nIf you would like to customize the cube animation, change `cubeDegree`. \nIf `cubeDegree` is 90, it moves like a regular hexahedron.\n\n```swift\ncollectionView.gemini\n    .cubeAnimation()\n    .cubeDegree(90)\n```\n\n## \u003Ca name=\"circle-rotation\"> CircleRotation\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FAssets\u002Fblob\u002Fmaster\u002FGemini\u002Fcircle-horizontal.gif\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FAssets\u002Fblob\u002Fmaster\u002FGemini\u002Fcircle-vertical.gif\">\n\u003C\u002Fp>\n\nAn animation moves in a circle. You can change `circleRadius` and `CircleRotationDirection`.\n\n```swift\ncollectionView.gemini\n    .circleRotationAnimation()\n    .radius(450) \u002F\u002F The radius of the circle\n    .rotateDirection(.clockwise) \u002F\u002F Direction of rotation. \n    .itemRotationEnabled(true) \u002F\u002F Whether the item rotates or not.\n```\n\n## \u003Ca name=\"3d-vector-rotation\"> 3D vector rotation\n\nAvailable for `Roll`, `Pitch` and `Yaw` animation. These rotation animation are designed based on 3-Dimensional vector. Figure-1 shows direction of rotation based on device.\n\n###### ***Figure-1*** Pitch, roll, and yaw axes ######\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FAssets\u002Fblob\u002Fmaster\u002FGemini\u002Fattitude_rotation.png\" width=\"350\">\n\u003C\u002Fp>\n\n###### Reference: [Event Handling Guide for UIKit Apps](https:\u002F\u002Fdeveloper.apple.com\u002Flibrary\u002Fcontent\u002Fdocumentation\u002FEventHandling\u002FConceptual\u002FEventHandlingiPhoneOS\u002FHandlingProcessedDeviceMotionData.html#\u002F\u002Fapple_ref\u002Fdoc\u002Fuid\u002FTP40009541-CH27-SW1)\n\n### \u003Ca name=\"roll-rotation\"> Roll Rotation\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FAssets\u002Fblob\u002Fmaster\u002FGemini\u002Froll-horizontal.gif\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FAssets\u002Fblob\u002Fmaster\u002FGemini\u002Froll-vertical.gif\">\n\u003C\u002Fp>\n\n### \u003Ca name=\"pitch-rotation\"> Pitch Rotation\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FAssets\u002Fblob\u002Fmaster\u002FGemini\u002Fpitch-horizontal.gif\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FAssets\u002Fblob\u002Fmaster\u002FGemini\u002Fpitch-vertical.gif\">\n\u003C\u002Fp>\n\n### \u003Ca name=\"yaw-rotation\"> Yaw Rotation\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FAssets\u002Fblob\u002Fmaster\u002FGemini\u002Fyaw-horizontal.gif\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FAssets\u002Fblob\u002Fmaster\u002FGemini\u002Fyaw-vertical.gif\">\n\u003C\u002Fp>\n\n\nEach types of rotation animation has `RotationEffect`(e.g. `RollRotationEffect`) and degree of rotation.\n\nCustomize `RotationEffect` (`up`, `down`, `sineWave`, `reverseSineWave`) and degree of rotation.\n\nIn the case of `rollRotation`, like this:\n```swift\ncollectionView.gemini\n    .rollRotationAnimation()\n    .degree(45)\n    .rollEffect(.rollUp)\n```\n\n## \u003Ca name=\"scale\"> Scale\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FAssets\u002Fblob\u002Fmaster\u002FGemini\u002Fscale-up.gif\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FAssets\u002Fblob\u002Fmaster\u002FGemini\u002Fscale-down.gif\">\n\u003C\u002Fp>\n\nThe `scaleUp` gradually increases frame size, `scaleDown` decreases.\n\n```swift\ncollectionView.gemini\n    .scaleAnimation()\n    .scale(0.75)\n    .scaleEffect(.scaleUp) \u002F\u002F or .scaleDown\n```\n\n## \u003Ca name=\"custom\"> Custom\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FAssets\u002Fblob\u002Fmaster\u002FGemini\u002Fcustom1.gif\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FAssets\u002Fblob\u002Fmaster\u002FGemini\u002Fcustom2.gif\">\n\u003C\u002Fp>\n\nYou can flexibly and easily customize scroll animation. Customize properties of `GeminiAnimation.custom` such as `scale`, `scaleEffect`, `rotationAngle`, `translation`, `easing`, `shadowEffect`, `alpha`, `cornerRadius`, `backgroundColor`, `anchorPoint`, etc.\n\nThe animation of gif is customized in the following way:\n\n```swift\ncollectionView.gemini\n    .customAnimation()\n    .translation(y: 50)\n    .rotationAngle(y: 13)\n    .ease(.easeOutExpo)\n    .shadowEffect(.fadeIn)\n    .maxShadowAlpha(0.3)\n```\n\nOr right side of gifs is customized as follows:\n\n```swift\ncollectionView.gemini\n    .customAnimation()\n    .backgroundColor(startColor: lightGreenColor, endColor: lightBlueColor)\n    .ease(.easeOutSine)\n    .cornerRadius(75)\n```\n\nThere are more sample code at [CustomAnimationViewController.swift](https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FGemini\u002Fblob\u002Fmaster\u002FExample\u002FGemini\u002FViewControllers\u002FCustomAnimationViewController.swift).\n\n## \u003Ca name=\"easing-function\"> Easing function\n`Gemini` supports various easing functions based on distance of scroll.\n\n- linear\n- easeInQuad\n- easeOutQuad\n- easeInOutQuad\n- easeInCubic\n- easeOutCubic\n- easeInOutCubic\n- easeInQuart\n-  easeOutQuart\n- easeInOutQuart\n- easeInQuint\n- easeOutQuint\n- easeInOutQuint\n- easeInSine\n- easeOutSine\n- easeInOutSine\n- easeInExpo\n- easeOutExpo\n- easeInOutExpo\n- easeInCirc\n- easeOutCirc\n- easeInOutCirc\n\n## \u003Ca name=\"shadow-effect\"> Shadow effect\nDefault value is `ShadowEffect.none`. Return `shadowView` in your custom class, which is a subclass of `GeminiCell`.\n\n- fadeIn\n- nextFadeIn\n- previousFadeIn\n- fadeOut\n- none\n\n```swift\nclass CustomCollectionViewCell: GeminiCell {\n    @IBOutlet weak var customShadowView: UIView!\n    override var shadowView: UIView? {\n        return customShadowView\n    }\n}\n```\n\n# \u003Ca name=\"usage\"> Usage\n\n1. ***Use Gemini classes***\n\n`Gemini` is designed to be easy to use. Use `GeminiCollectionView` and `GeminiCell`. These classes is subclass of `UICollectionView`, `UICollectionViewCell`.\n\n2. ***Configure animation***\n\nConfigure animation with fluent interface based on method chaining. You can develop expressive code that enhances readability.\n\n3. ***Call function for animation***\n\nFinally, call `animateVisibleCells()` in `scrollViewDidScroll(_:)`\n\n> NOTE: If you want to adapt animation immediately after view is displayed, call `animateCell(_:)` in `collectionView(_:cellForItemAt:)` and `collectionView(_:willDisplay:forItemAt:)`.\n\n\n```swift\n\u002F\u002F Import Gemini\nimport Gemini\n\n\u002F\u002F Inherite GeminiCell\nclass CustomCell: GeminiCell {\n    ...\n}\n\n\u002F\u002F Conform to UICollectionViewDelegate and UICollectionViewDataSource\nclass CustomViewController: UIViewController: UICollectionViewDelegate, UICollectionViewDataSource {\n\n    \u002F\u002F Inherite GeminiCollectionView\n    @IBOutlet weak var collectionView: GeminiCollectionView!\n\n    ...\n\n    \u002F\u002F Configure animation and properties\n    func configureAnimation() {\n        collectionView.gemini\n            .circleRotationAnimation()\n            .radius(400)\n            .rotateDirection(.clockwise)\n    }\n\n    \u002F\u002F Call animation function\n    func scrollViewDidScroll(_ scrollView: UIScrollView) {\n        collectionView.animateVisibleCells()\n    }\n\n    func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {\n        if let cell = cell as? GeminiCell {\n            self.collectionView.animateCell(cell)\n        }\n    }\n\n    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {\n        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: \"CustomCell\", for: indexPath) as! CustomCell\n        self.collectionView.animateCell(cell)\n        return cell\n    }\n```\n\nSee [Example](https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FGemini\u002Ftree\u002Fmaster\u002FExample\u002FGemini), for more details.\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## \u003Ca name=\"requirements\"> Requirements\n\n- Xcode 10.2.1\n- Swift 5.0\n\n## \u003Ca name=\"installation\"> Installation\n\n### CocoaPods\n\nGemini is available through [CocoaPods](http:\u002F\u002Fcocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod \"Gemini\"\n```\n\n### Carthage\n\nAdd the following line to your `Cartfile`:\n\n```ruby\ngithub \"shoheiyokoyama\u002FGemini\"\n```\n\n## \u003Ca name=\"author\"> Author\n\nShohei Yokoyama\n\n- [GitHub](https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama)\n- [Facebook](https:\u002F\u002Fwww.facebook.com\u002Fshohei.yokoyama.96)\n- [Twitter](https:\u002F\u002Ftwitter.com\u002Fshoheiyokoyam)\n- Gmail: shohei.yok0602@gmail.com\n\n## License\n\nGemini is available under the MIT license. See the [LICENSE file](https:\u002F\u002Fgithub.com\u002Fshoheiyokoyama\u002FGemini\u002Fblob\u002Fmaster\u002FLICENSE) for more info.\n","Gemini 是一个基于滚动的iOS动画框架，使用Swift编写。它提供丰富的动画效果和高度可定制性，支持多种类型的动画如立方体、圆形旋转、3D矢量旋转等，并且允许开发者创建自定义滚动动画。Gemini通过流畅的方法链接口简化了动画设置过程，使得即使是复杂的动画也能以直观简单的方式实现。此外，该库兼容CocoaPods和Carthage，方便集成到项目中。适用于需要为UICollectionView添加动态视觉效果的应用场景，比如商品展示、图片浏览等，能够显著提升用户体验。","2026-06-11 03:09:59","top_language"]