https://github.com/mengxianliang/xlchannelcontrol
iOS 仿腾讯新闻客户端的频道管理功能
https://github.com/mengxianliang/xlchannelcontrol
channels control
Last synced: 6 months ago
JSON representation
iOS 仿腾讯新闻客户端的频道管理功能
- Host: GitHub
- URL: https://github.com/mengxianliang/xlchannelcontrol
- Owner: mengxianliang
- License: mit
- Created: 2017-01-11T14:35:20.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-01-08T02:04:37.000Z (almost 6 years ago)
- Last Synced: 2025-04-10T01:14:57.398Z (6 months ago)
- Topics: channels, control
- Language: Objective-C
- Homepage:
- Size: 3.48 MB
- Stars: 258
- Watchers: 6
- Forks: 58
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# XLChannelControl
### 说明
参考了今日头条、网易、腾讯这几个新闻客户端的频道管理功能,觉得腾讯的逻辑和操作还是比较清晰的,所以仿照这腾讯新闻的客户端做了一个这个频道管理的功能;
实现原理是利用UICollectionView+UIGestureRecognizer实现的。### 功能
- [x] 拖拽排序已订阅频道
- [x] 点击删除、添加订阅频道
- [x] 固定第一个订阅频道,不可点击、拖拽### 显示效果
| 正常显示 | 点击删除/增加 | 拖拽排序 |
| ---- | ---- | ---- |
|| | |### 使用方法
```objc
[[XLChannelControl shareControl] showChannelViewWithInUseTitles:titleArr1 unUseTitles:titleArr2 finish:^(NSArray *inUseTitles, NSArray *unUseTitles) {
//处理后续问题
}];
```
### 参数说明:**传入参数:**
**titleArr1** :已选频道集合 **titleArr2**:未选频道集合
**返回数据:**
**inUseTitles**:排序、增删后的已选频道集合 **unUseTitles**:增删后的未选频道集合### 实现原理请参考[我的博文](http://blog.csdn.net/u013282507/article/details/54374952)
### 我之前用ScrollView实现的版本[戳这里](http://code.cocoachina.com/view/133979)
### 个人开发过的UI工具集合 [XLUIKit](https://github.com/mengxianliang/XLUIKit)