# CGXPageCollectionView-OC
**Repository Path**: 974794055/CGXPageCollectionView-OC
## Basic Information
- **Project Name**: CGXPageCollectionView-OC
- **Description**: UICollectionView封装的库,分区圆角边框,瀑布流、标签流、不规则布局等主流APP分页列表滚动视图的库封装
- **Primary Language**: Objective-C
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 2
- **Forks**: 0
- **Created**: 2020-07-17
- **Last Updated**: 2023-11-18
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# CGXPageCollectionView-OC
[](#)
[](#)
[](https://cocoapods.org/pods/CGXPageCollectionViewOC)
[](#)
## 基于UICollectionView封装库封装列表
- 下载链接:https://github.com/974794055/CGXPageCollectionView-OC.git
- pod名称 :CGXPageCollectionViewOC
- 最新版本号: 1.0.2
- 功能:
- UICollectionView封装的库,分区圆角边框,瀑布流、标签流、不规则布局等主流APP分页列表滚动视图的库封装
优点:
- 1、快速搭建项目列表界面;
- 2、提供更加全面丰富、高度自定义的效果;
- 3、使用子类化代理管理cell样式,逻辑更清晰,扩展更简单;
- 4、高度封装列表容器,使用便捷,完美支持列表的生命周期调用;
效果:
- 1、常规列表;
- 2、瀑布流列表;
- 3、标签流列表;
- 4、不规则列表;
- 4、水平滚动列表;
- 5、嵌套固定列表;
## 效果预览
### 库架构预览
说明 | Gif |
----|------|
架构🌈层级架构 |
|
### 主列表效果预览
说明 | Gif |
----|------|
效果🌈普通列表 |
|
效果🌈标签列表 |
|
效果🌈瀑布流列表 |
|
效果🌈不规则列表 |
|
效果🌈水平滚动列表 |
|
效果🌈特殊嵌套 |
|
### 目的:
- 参考学习如何自定义
- 直接修改自定义示例类以快速实现自己的需求
## 要求
- iOS 8.0+
- Xcode 9+
- Objective-C
## 安装
### 手动
Clone代码,把CGXPageCollectionViewOC文件夹拖入项目,#import "CGXPageCollectionViewOC.h",就可以使用了;
### CocoaPods
```ruby
target '' do
pod 'CGXPageCollectionViewOC'
end
```
先执行`pod repo update`,再执行`pod install`
## 结构图
## 使用
### CGXPageCollectionGeneralView普通布局使用示例
1.初始化CGXPageCollectionGeneralView
```Objective-C
self.generalView = [[CGXPageCollectionGeneralView alloc] init];
self.generalView.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height-88-34);
self.generalView.viewDelegate = self;
self.generalView.isShowDifferentColor = YES;
self.generalView.backgroundColor = [UIColor whiteColor];
[self.view addSubview:self.generalView];
[self.generalView registerCell:[CGXPageCollectionTextCell class] IsXib:NO];
[self.generalView registerFooter:[FooterRoundReusableView class] IsXib:NO];
[self.generalView registerHeader:[HeaderRoundReusableView class] IsXib:NO];
[self.generalView registerFooter:[FooterReusableView class] IsXib:NO];
[self.generalView registerHeader:[HeaderReusableView class] IsXib:NO];
```
2.加载CGXPageCollectionGeneralView数据源
```Objective-C
self.titleArr = ({
NSArray *arr = [NSArray arrayWithObjects:
@"有Header&Footer,包Header,包Footer",
@"有Header&Footer,包Header,不包Footer",
@"有Header&Footer,不包Header,包Footer",
@"有Header&Footer,不包Header,不包Footer",
@"borderLine 包Section",
@"borderLine 包Section(带投影)",
@"有sections底色,cell左对齐",
@"有sections底色,cell居中",
@"有sections底色,cell右对齐",
@"cell右对齐与cell右侧开始",
nil];
arr;
});
NSMutableArray *dataArray = [NSMutableArray array];
for (int i = 0; i
邮 箱:974794055@qq.com
群名称:潮流App-iOS交流
QQ 群:227219165
QQ 号:974794055
喜欢就star❤️一下吧
## License
CGXPageCollectionViewOC is released under the MIT license.