Latest 0.2.0
Homepage https://github.com/HotWordland/WLCardViewLayout
License MIT
Platforms ios 7.0, requires ARC
Authors

CI Status
Version
License
Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

WLCardViewLayout is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "WLCardViewLayout"

支持cocoapods

pod "WLCardViewLayout"

效果

使用

在可视化编辑里:

然后关联cardlayout至Controller:

@property (weak, nonatomic) IBOutlet WLCardViewLayout *cardLayout;
- (void)viewDidLoad {
[super viewDidLoad];
[self.cardLayout setSwipeToDeleteDelegate:self];
}

//CollectView数据源代理 

- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
return 1;
}
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{
return list.count;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{

UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"CardCell" forIndexPath:indexPath];
UIImageView *im = [cell viewWithTag:100];
[im setImage:[UIImage imageNamed:list[indexPath.section]]];
return cell;
}

//swipe删除数据源代理

-(void)swipeToDeleteLayout:(WLCardViewLayout *)layout didDeleteCellAtIndexPath:(NSIndexPath *)indexPath{
[list removeObjectAtIndex:indexPath.section];
}

Author

巫龙, [email protected]

License

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

Latest podspec

{
    "name": "WLCardViewLayout",
    "version": "0.2.0",
    "summary": "Card and swipe out layout of CollectView.(u53efu4ee5u6ed1u52a8u5220u9664u7684u5361u7247u89c6u56feu5e03u5c40)",
    "description": "a extend of collectViewlayout which can swipe to delte and use like card",
    "homepage": "https://github.com/HotWordland/WLCardViewLayout",
    "license": "MIT",
    "authors": {
        "u5debu9f99": "[email protected]"
    },
    "source": {
        "git": "https://github.com/HotWordland/WLCardViewLayout.git",
        "tag": "0.2.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "WLCardViewLayout": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This