1 Star 0 Fork 5

steven.mo / CFDropDownMenuView

forked from CoderPeak / CFDropDownMenuView 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

CFDropDownMenuView (交流QQ 545486205)

简单好用的, 可自定义选中和非选中状态样式的 下拉列表菜单选择筛选条件的控件

支持pod导入
pod 'CFDropDownMenuView'

使用cocoapods导入 完全可以使用

  • 目前整合到我们公司app中
  • 在这下载demo, 由于配置原因 demo中的.bundle资源文件不能被xcode识别 可手动拖入项目中
  • 在github上下载 就没任何问题 [github]:https://github.com/CoderPeak/CFDropDownMenuView "在github上的项目,欢迎关注"

demo展示 - 由于网络原因, 可能gif效果图会展示的比较卡, 可以下载运行查看demo---简单使用在gif图片下面

特别注意

  • 用cocoapods导入使用的时候, 项目没任何问题
  • 但是仅在下载demo的时候 .bundle资源包实际上已经下载到您本地 但是不知为何, 用xcode打开项目的时候 xcode不能识别.bundle资源包. 右击项目文件 show in finder 即可以查看到.bundle资源包 然后手动拖入xcode即可 此时箭头就会随下拉列表的展示/缩回 进行旋转动画

使用

  • 创建
//  创建
    CFDropDownMenuView *dropDownMenuView = [[CFDropDownMenuView alloc] initWithFrame:CGRectMake(0, 104, [UIScreen mainScreen].bounds.size.width, 45)];            
       
     /**
     *  stateConfigDict 属性 格式 详见CFDropDownMenuView.h文件
     *  可不传  使用默认样式  /   也可自定义样式
     */
//    dropDownMenuView.stateConfigDict = @{
//                                        @"selected" : @[[UIColor redColor], @"红箭头"],
//                                        };
//    dropDownMenuView.stateConfigDict = @{
//                                        @"normal" : @[[UIColor orangeColor], @"测试黄"],
//                                        };
//    dropDownMenuView.stateConfigDict = @{
//                                         @"selected" : @[CF_Color_DefaultColor, @"天蓝箭头"],
//                                         @"normal" : @[[UIColor orangeColor], @"橙箭头"]
//                                         };                                        };
    // 注:  需先 赋值数据源dataSourceArr二维数组  再赋值defaulTitleArray一维数组
    dropDownMenuView.dataSourceArr = @[
                                        @[@"全部", @"iOS开发", @"安卓开发", @"JAVA开发", @"PHP开发"],
                                        @[@"5-10k", @"10-15k", @"15-20k", @"20k以上"],
                                        @[@"1年以内", @"1-3年", @"3-5年", @"5年以上"]
                                        ].mutableCopy;
    
    dropDownMenuView.defaulTitleArray = [NSArray arrayWithObjects:@"工作岗位",@"薪资", @"工作经验", nil];
    // 设置代理
    dropDownMenuView.delegate = self;
    
    // 下拉列表 起始y
    dropDownMenuView.startY = CGRectGetMaxY(dropDownMenuView.frame);
    
    /**
     *  回调方式一: block
     */
    __weak typeof(self) weakSelf = self;
    dropDownMenuView.chooseConditionBlock = ^(NSString *currentTitle, NSArray *currentTitleArray){
    	NSLog(@"当前选中的是%@    展示的所有条件是%@", currentTitle, currentTitleArray);
    };
    // 添加到父视图中
    [self.view addSubview:dropDownMenuView];
 /**
  *  回调方式二: 代理
  */
- (void)dropDownMenuView:(CFDropDownMenuView *)dropDownMenuView clickOnCurrentButtonWithTitle:(NSString *)currentTitle andCurrentTitleArray:(NSArray *)currentTitleArray{
	NSLog(@"当前选中的是%@    展示的所有条件是%@", currentTitle, currentTitleArray);
}
The MIT License (MIT) Copyright (c) 2016 CoderPeak (https://github.com/CoderPeak/CFDropDownMenuView) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

简单好用的, 可以自定义选中和非选中状态样式的 下拉列表菜单控件 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/steven.mo/CFDropDownMenuView.git
git@gitee.com:steven.mo/CFDropDownMenuView.git
steven.mo
CFDropDownMenuView
CFDropDownMenuView
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891