• Stars
    star
    1,535
  • Rank 29,469 (Top 0.6 %)
  • Language
    Objective-C
  • Created about 9 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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.

More Repositories

1

iOSInterviewQuestions

iOS interview questions;iOS面试题集锦(附答案)--学习qq群或 Telegram 群交流 https://github.com/ChenYilong/iOSBlog/issues/21
Swift
9,244
star
2

CYLTabBarController

[EN]It is an iOS UI module library for adding animation to iOS tabbar items and icons with Lottie, and adding a bigger center UITabBar Item. [CN]【中国特色 TabBar】一行代码实现 Lottie 动画TabBar,支持中间带+号的TabBar样式,自带红点角标,支持动态刷新。【iOS13 & Dark Mode & iPhone XS MAX supported】
Swift
6,860
star
3

iOS9AdaptationTips

iOS9适配系列教程(iOS开发学习交流群: https://github.com/ChenYilong/iOSBlog/issues/21)
Objective-C
4,477
star
4

ParseSourceCodeStudy

Facebook开源的Parse源码分析【系列】
Objective-C
2,876
star
5

iOSBlog

微博@iOS程序犭袁 的blog
Objective-C
1,117
star
6

CYLTableViewPlaceHolder

一行代码完成“空TableView占位视图”管理
Objective-C
901
star
7

iOS10AdaptationTips

for iOS10 in [ObjC, Swift, English, 中文] {...}
Objective-C
642
star
8

iOS11AdaptationTips

for iOS11 in [ObjC, Swift, English, 中文] {...} -- iOS11适配系列教程
486
star
9

WebRTC

WebRTC for iOS
Objective-C
428
star
10

CYLDeallocBlockExecutor

Hello block,byebye dealloc!一行代码代替dealloc完成“self-manager”
Objective-C
253
star
11

CYLSearchViewController

模仿iPhone短信聊天里的搜索框样式,点击搜索后,搜索框平滑移动到导航栏上。
Objective-C
176
star
12

iOS13AdaptationTips

iOS13 AdaptationTips
175
star
13

CYLExternalURL

模仿 《简书 App》 的效果:在html中跳转到App中的对应页面,并能从App跳转到原来的网址
Objective-C
117
star
14

iOS12AdaptationTips

iOS12AdaptationTips
86
star
15

CYLChatKit

仿微信高度自定义UI、集成第三方IM SDK。An IM App UI Framework, support sending text, pictures, audio, video, location messaging, managing address book, more interesting features.
Objective-C
71
star
16

iOSDevelopmentTips

iOS开发笔记
Objective-C
67
star
17

SMSCodeButton

可用作短信验证码的倒计时 Button
Objective-C
52
star
18

CYLCURLNetworking

Networking based on curl
Objective-C
48
star
19

CYLTabBarControllerDemoForWeib

CYLTabBarController 的示例DEMO
Objective-C
34
star
20

LineLayout

苹果官方展示UICollectionView 用法的 Demo
Objective-C
22
star
21

CYLHttpTest

【调接口神器】可将 XML 或 JSON 数据解析并转换为Plist文件存在本地,方便调接口。
Objective-C
21
star
22

CYLWebViewController

WebViewControllerDemo,可App类似 Safari 的效果,能随着滑动隐藏底部工具栏
Objective-C
20
star
23

XcodeMissingTemplates

Add⓵Empty Application.xctemplate ⓶Objective-C category.xctemplate ⓷Objective-C class extension.xctemplate ⓸Objective-C protocol.xctemplate
Objective-C
11
star
24

CYLTableViewRowAction

Use UITableViewRowAction as if it supports iOS7+.
Objective-C
11
star
25

CYLTabBarController-Swift

Swift版本的CYLTabBarController ( https://github.com/ChenYilong/CYLTabBarController ),支持 CocoaPods 。
11
star
26

CYLBusinessCardButton

重写 UIButton ,使用一个 UIButton,显示一张名片,内含有三个 Label 一个头像。
Objective-C
11
star
27

CYLSwipeBetweenControllers

手势切换控制器,动画流畅,有过度效果。
Objective-C
8
star
28

Flutter101

Flutter101
Dart
8
star
29

HandleViewControlEventsWithBlock

展示如何使用runtime和手势两种方式为UIView添加类似UIButton的addTarget-action-forControlEvents-事件
Objective-C
7
star
30

ChenYilong

2
star
31

ReactNativeDemo

Objective-C++
2
star