Git Product home page Git Product logo

gxcardview-swift's Introduction

GXCardView

卡片式布局(探探附近/QQ配对),可以设置卡片堆叠效果,可以设置循环效果。 有建议可以联系QQ交流群:1101980843,喜欢就给个star哦,谢谢关注!

先上demo菜单效果

Requirements

Usage in you Podfile:

pod 'GXCardView-Swift'
pod 'GXCardView'

GXCardViewDataSource

func numberOfItems(in cardView: GXCardView) -> Int
func cardView(_ cardView: GXCardView, cellForItemAt indexPath: IndexPath) -> GXCardCell

GXCardViewDelegate

@objc optional func cardView(_ cardView: GXCardView, didSelectItemAt index: Int)
@objc optional func cardView(_ cardView: GXCardView, didRemove cell: GXCardCell, forItemAt index: Int, direction: GXCardCell.SwipeDirection)
@objc optional func cardView(_ cardView: GXCardView, didRemoveLast cell: GXCardCell, forItemAt index: Int, direction: GXCardCell.SwipeDirection)
@objc optional func cardView(_ cardView: GXCardView, didDisplay cell: GXCardCell, forItemAt index: Int)
@objc optional func cardView(_ cardView: GXCardView, didMove cell: GXCardCell, forItemAt index: Int, move point: CGPoint, direction: GXCardCell.SwipeDirection)

可以设置参数

/// 卡片可见数量(默认3)
 open var visibleCount: Int = 3
 /// 卡片与卡片之间的insets(从上至下,正负皆可)
 open var cardInsets: UIEdgeInsets = UIEdgeInsets(top: 10, left: 10, bottom: -10, right: 10)
 /// 侧滑最大角度(默认15°)
 open var maxAngle: CGFloat = 15.0
 /// 是否重复(默认false)
 open var isRepeat: Bool = false
 /// 最大移除距离(默认屏幕的1/4)
 open var maxRemoveDistance: CGFloat = GX_ScreenWidth * 0.25
 /// 是否需要移除动画结束才可以再次拖拽
 open var isPanAnimatedEnd: Bool = false

License

MIT

gxcardview-swift's People

Contributors

gsyhei avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.