Giter Site home page Giter Site logo

collectionviewclassifymenu's Introduction

CollectionViewClassifyMenu

功能展示

Example screenshot

单选可折叠菜单的特性展示

Example screenshot

Check out my weibo for more info.

然并卵? 请看以下应用场景:

场景一:《手机淘宝App》

筛选条件,如果数目过多,可以折叠,:比如《手机淘宝App》中商品的评价筛选

enter image description here

场景二:《脉脉App》

分类菜单:比如《脉脉App》中的搜索分类筛选

enter image description here

Demo中具有两种样式

第一种是CollectionView做的两级菜单,可以折叠第二级菜单

第二种是侧边栏菜单,具有多选功能,并可将数据持久化,在下次打开app后,保留用户的筛选条件.默认保存.

数据持久化使用NSCoding,若要关闭该项功能,可在AppDelegate里清除固化数据,

清除方法已经在工程中写出:

- (void)initFilterSetting:(BOOL)restore
{
    if (!restore) {
        CYLFilterParamsTool *filterParamsTool = [[CYLFilterParamsTool alloc] init];
        [NSKeyedArchiver archiveRootObject:filterParamsTool toFile:filterParamsTool.filename];
    }
}

用法如下

YES为保存,NO为不保存.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    //...
    //设NO表示,每次启动程序,清除用户上次的筛选条件,不写该行,默认保存.
    [self initFilterSetting:NO];
    return YES;
}

Check out my twitter for more info.

collectionviewclassifymenu's People

Contributors

bryant1410 avatar chenyilong avatar

Watchers

 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.