Latest 0.1.0
Homepage https://github.com/gsyhei/GXCardView
License MIT
Platforms ios 7.0, requires ARC
Frameworks Foundation, UIKit
Authors

卡片式布局(探探附近/QQ配对),可重用机制,跟tableView一个用法,网上看了很多写得过于复杂,想想还是自己写。

喜欢就给个star哦,QQ:279694479

Requirements

  • iOS 7.0 or later
  • Xcode 9.0 or later

Usage in you Podfile:

pod 'GXCardView'

GXCardViewDataSource

- (NSInteger)numberOfCountInCardView:(GXCardView *)cardView;

- (GXCardViewCell *)cardView:(GXCardView *)cardView cellForRowAtIndex:(NSInteger)index;

GXCardViewDelegate

- (void)cardView:(GXCardView *)cardView didRemoveCell:(GXCardViewCell *)cell forRowAtIndex:(NSInteger)index;

- (void)cardView:(GXCardView *)cardView didRemoveLastCell:(GXCardViewCell *)cell forRowAtIndex:(NSInteger)index;

- (void)cardView:(GXCardView *)cardView didDisplayCell:(GXCardViewCell *)cell forRowAtIndex:(NSInteger)index;

- (void)cardView:(GXCardView *)cardView didMoveCell:(GXCardViewCell *)cell forMovePoint:(CGPoint)point;

重载数据

- (void)reloadData;
- (void)reloadDataAnimated:(BOOL)animated;

可以设置参数

/** 卡片可见数量(默认3) */
@property (nonatomic, assign) NSInteger visibleCount;
/** 行间距(默认10.0,可自行计算scale比例来做间距) */
@property (nonatomic, assign) CGFloat lineSpacing;
/** 列间距(默认10.0,可自行计算scale比例来做间距) */
@property (nonatomic, assign) CGFloat interitemSpacing;
/** 侧滑最大角度(默认15°) */
@property (nonatomic, assign) CGFloat maxAngle;
/** 最大移除距离(默认屏幕的1/4) */
@property (nonatomic, assign) CGFloat maxRemoveDistance;

License

MIT

Latest podspec

{
    "name": "GXCardView",
    "version": "0.1.0",
    "summary": "u4e00u4e2au5361u7247u5f0fu5e03u5c40uff0cu7c7bu4f3cuff08u63a2u63a2u9644u8fd1/QQu989cu503cu5339u914duff09u7b49...",
    "homepage": "https://github.com/gsyhei/GXCardView",
    "license": "MIT",
    "authors": {
        "Gin": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/gsyhei/GXCardView.git",
        "tag": "0.1.0"
    },
    "requires_arc": true,
    "source_files": "GXCardView/GXCardView*.{h,m}",
    "frameworks": [
        "Foundation",
        "UIKit"
    ]
}

Pin It on Pinterest

Share This