Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/JunAILiang/JMColumnMenu
仿腾讯新闻、今日头条栏目管理
https://github.com/JunAILiang/JMColumnMenu
Last synced: about 2 months ago
JSON representation
仿腾讯新闻、今日头条栏目管理
- Host: GitHub
- URL: https://github.com/JunAILiang/JMColumnMenu
- Owner: JunAILiang
- License: mit
- Created: 2017-12-13T02:43:22.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-16T10:04:31.000Z (almost 7 years ago)
- Last Synced: 2024-10-29T03:48:52.641Z (3 months ago)
- Language: Objective-C
- Size: 34.2 KB
- Stars: 49
- Watchers: 2
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - JMColumnMenu - 仿腾讯新闻、今日头条栏目管理。 (OOM-Leaks-Crash / Menu-PopupView)
README
# JMColumnMenu
仿腾讯新闻、今日头条栏目管理# 如何使用
* 可以通过CocoaPods导入 ``` pod 'JMColumnMenu', '~> 1.1.1' ```
* 或者直接下载工程把JMColumnMenu导入到您的项目中## 初始化数据
```
NSMutableArray *myTagsArrM = [NSMutableArray arrayWithObjects:@"要闻",@"视频",@"娱乐",@"军事",@"新时代",@"独家",@"广东",@"社会",@"图文",@"段子",@"搞笑视频", nil];
NSMutableArray *otherArrM = [NSMutableArray arrayWithObjects:@"八卦",@"搞笑",@"短视频",@"图文段子",@"极限第一人", nil];
```## 一行代码调用
```
JMColumnMenu *menuVC = [JMColumnMenu columnMenuWithTagsArrM:myTagsArrM OtherArrM:otherArrM Type:JMColumnMenuTypeTencent Delegate:self];
[self presentViewController:menuVC animated:YES completion:nil];
JMColumnMenu *menuVC1 = [[JMColumnMenu alloc] initWithTagsArrM:myTagsArrM OtherArrM:otherArrM Type:JMColumnMenuTypeTencent Delegate:self];
[self presentViewController:menuVC1 animated:YES completion:nil];
```
## 遵守代理
```
#pragma mark - JMColumnMenuDelegate
- (void)columnMenuTagsArr:(NSMutableArray *)tagsArr OtherArr:(NSMutableArray *)otherArr {
NSLog(@"选择数组---%@",tagsArr);
NSLog(@"未选择数组%@",otherArr);
}- (void)columnMenuDidSelectTitle:(NSString *)title Index:(NSInteger)index {
NSLog(@"点击的标题---%@ 对应的index---%zd",title, index);
}
```
联系我:
* qq: 1245424073
[我的博客](https://ljmvip.cn)