Giter Site home page Giter Site logo

xlchannelcontrol's Introduction

XLChannelControl

说明

参考了今日头条、网易、腾讯这几个新闻客户端的频道管理功能,觉得腾讯的逻辑和操作还是比较清晰的,所以仿照这腾讯新闻的客户端做了一个这个频道管理的功能;
实现原理是利用UICollectionView+UIGestureRecognizer实现的。

功能

  • 拖拽排序已订阅频道
  • 点击删除、添加订阅频道
  • 固定第一个订阅频道,不可点击、拖拽

显示效果

正常显示 点击删除/增加 拖拽排序
image image image

使用方法

[[XLChannelControl shareControl] showChannelViewWithInUseTitles:titleArr1 unUseTitles:titleArr2 finish:^(NSArray *inUseTitles, NSArray *unUseTitles) {
    //处理后续问题
}];

参数说明:

传入参数:
titleArr1 :已选频道集合 titleArr2:未选频道集合

返回数据:
inUseTitles:排序、增删后的已选频道集合 unUseTitles:增删后的未选频道集合

实现原理请参考我的博文

我之前用ScrollView实现的版本戳这里

个人开发过的UI工具集合 XLUIKit

xlchannelcontrol's People

Contributors

mengxianliang avatar

Watchers

James Cloos avatar Frank 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.