12207480 / dopdropdownmenu-enhanced Goto Github PK
View Code? Open in Web Editor NEWDOPDropDownMenu 添加双列表 优化版 新增图片支持(double tableView, The optimization version ,new add image,detailText)
License: MIT License
DOPDropDownMenu 添加双列表 优化版 新增图片支持(double tableView, The optimization version ,new add image,detailText)
License: MIT License
我在加载数据的时候类似tableView的操作, 但是在重新刷新数据的时候出现了问题 DropDown给我返回的colum 为-1 导致我在数组获取数据的时候失败 ,最后跟了您的代码,也发现有这个问题,但是您用if else 吧-1这列数据当做第三列数据,我也准备在我的代码中这样做, 但是您在代码使用说明中并没有提起...
你好、请问整块的背景色该怎么修改呢?
请问,比如我现在没有点击屏幕,而是点击了导航条(或其他控件),如何让table收缩回去呢?
功能一:菜单的宽度能否自定义调整,而不是固定满屏
功能二:下拉列表能否增加一个空白的view让我们自定义,加入自己想要的一些元素
现在的方法是默认读取数组第一个的数据,如果我的第一个是请选择之类 如何实现?
如题,如果有一个双列菜单,当leftTableView中的某个cell和rightTableView的某个cell相同时,点击左边cell,右边那个cell会默认选中。比如区县菜单,点选左边cell崇明,其中的右边cell崇明会默认选中。
那个三角指示器可以改成随文字的宽度改变位置吗,一直靠右边有点不好看
我这里手动把bglayer的颜色跟self.backgourndColor挂钩,原来是准备把背后的东西显示出来,
然而发现,当选择tableview的任何一个row之后
textLayer确实更新了,但是旧的文字却没有移除掉
您好,发现没设置menu 的defaultIndexPath,然后点开每个菜单,还是会默认选中第一项
然后我是需要设置哪个值,来让第一次进来,每个菜单点开是都默认是没有选择的效果呢?
我自己项目是3列的。自己写了一个项目里面用,不过没有开源出来,作者维护很久了,可以做个3列的,增加场景覆盖范围
非常好的项目,希望能加入cocoapod的支持,谢谢
展开之后无法点击。
我试着改你的代码 添加了一个代理方法
hi..谢谢你提供的控件,能否增加一些方法,用于方便的设置每一列菜单的选中项,或者随时可以重置某几列菜单为默认选项呢。比如,我一个三列菜单,选了某一列下的一个子项,我希望把其他列的菜单还原成默认值。谢谢。
如何设置默认选中的indexpath?
大神能否更新个三角形可以换成自定义的图片,感谢
我看了下你里面的reloaddata 是会同时刷新整个视图的吧。我想单独刷新一个表,怎么弄呢?
#import "DOPDropDownMenu.h"
187: 需要添加判断 if ([_delegate respondsToSelector:@selector(menu:numberOfItemsInRow:column:)]) {}
否则未实现则 Crash
如上.
大神,想在外部直接给下拉按钮的标题赋值 ,而不是选取每一组数据源数组的第一个为默认的标题
如题
isClickHaveItemValid is always zero even i have only one lefttableview
BOOL haveItem = [self confiMenuWithSelectRow:indexPath.row];
BOOL isClickHaveItemValid = self.isClickHaveItemValid ? YES : haveItem;
if (isClickHaveItemValid && _delegate && [_delegate respondsToSelector:@selector(menu:didSelectRowAtIndexPath:)]) {
[self.delegate menu:self didSelectRowAtIndexPath:[DOPIndexPath indexPathWithCol:_currentSelectedMenudIndex row:indexPath.row]];
how to reloadData
is there an english version of this pod?
尝试将menu放置在navigationBar上,但是无法显示。如何能够正确显示在navigationBar的正中间?
如题, 谢谢.
NSInteger num = [_leftTableView numberOfRowsInSection:0] >[_rightTableView numberOfRowsInSection:0]?[_leftTableView numberOfRowsInSection:0]:[_rightTableView numberOfRowsInSection:0];
这样写会不会更合理一些???
比如左边只有一行,右边有10行的情况。
第二个问题
menu每一列的初始title 可不可以不是第一个cell的title而是自定义,选中后再呈现cell的title
阁下的代码动画结束逻辑的 complete 全都放在的代码的末尾执行, 我认为这样是不对的
例如:
[self animateIndicator:indicator Forward:forward complete:^{
[self animateTitle:title show:forward complete:^{
[self animateBackGroundView:background show:forward complete:^{
[self animateTableView:tableView show:forward complete:^{
}];
}];
}];
}];
complete();
应该改为
[self animateIndicator:indicator Forward:forward complete:^{
[self animateTitle:title show:forward complete:^{
[self animateBackGroundView:background show:forward complete:^{
[self animateTableView:tableView show:forward complete:^{
complete();
}];
}];
}];
}];
这样保证调用该方法时的 complete 是在所有动画完成时才调用的
另外几个建议
手势操作 例如 展开和收起 增加代码直接调用接口
- (void)menuTappedWithIndex:(NSInteger)tapIndex; //通过传入 index 展开列表 代码引用
-(void)menuTapped:(UITapGestureRecognizer *)paramSender
- (void)shrinkMenu; //收起 代码引用
- (void)backgroundTapped:(UITapGestureRecognizer *)paramSender
感谢阁下提供这么优秀的代码 谢谢
uplicate symbol OBJC_IVAR$_DOPDropDownMenu._numOfMenu in:
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Intermediates/agriculturalApp.build/Debug-iphonesimulator/agriculturalApp.build/Objects-normal/x86_64/DOPDropDownMenu.o
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Products/Debug-iphonesimulator/libDOPDropDownMenu-Enhanced.a(DOPDropDownMenu.o)
duplicate symbol OBJC_IVAR$_DOPDropDownMenu._indicators in:
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Intermediates/agriculturalApp.build/Debug-iphonesimulator/agriculturalApp.build/Objects-normal/x86_64/DOPDropDownMenu.o
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Products/Debug-iphonesimulator/libDOPDropDownMenu-Enhanced.a(DOPDropDownMenu.o)
duplicate symbol OBJC_IVAR$_DOPDropDownMenu._bgLayers in:
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Intermediates/agriculturalApp.build/Debug-iphonesimulator/agriculturalApp.build/Objects-normal/x86_64/DOPDropDownMenu.o
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Products/Debug-iphonesimulator/libDOPDropDownMenu-Enhanced.a(DOPDropDownMenu.o)
duplicate symbol OBJC_IVAR$_DOPDropDownMenu._titles in:
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Intermediates/agriculturalApp.build/Debug-iphonesimulator/agriculturalApp.build/Objects-normal/x86_64/DOPDropDownMenu.o
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Products/Debug-iphonesimulator/libDOPDropDownMenu-Enhanced.a(DOPDropDownMenu.o)
duplicate symbol OBJC_IVAR$_DOPDropDownMenu._textColor in:
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Intermediates/agriculturalApp.build/Debug-iphonesimulator/agriculturalApp.build/Objects-normal/x86_64/DOPDropDownMenu.o
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Products/Debug-iphonesimulator/libDOPDropDownMenu-Enhanced.a(DOPDropDownMenu.o)
duplicate symbol OBJC_IVAR$_DOPDropDownMenu._separatorColor in:
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Intermediates/agriculturalApp.build/Debug-iphonesimulator/agriculturalApp.build/Objects-normal/x86_64/DOPDropDownMenu.o
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Products/Debug-iphonesimulator/libDOPDropDownMenu-Enhanced.a(DOPDropDownMenu.o)
duplicate symbol OBJC_IVAR$_DOPDropDownMenu._indicatorColor in:
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Intermediates/agriculturalApp.build/Debug-iphonesimulator/agriculturalApp.build/Objects-normal/x86_64/DOPDropDownMenu.o
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Products/Debug-iphonesimulator/libDOPDropDownMenu-Enhanced.a(DOPDropDownMenu.o)
duplicate symbol OBJC_IVAR$_DOPIndexPath._column in:
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Intermediates/agriculturalApp.build/Debug-iphonesimulator/agriculturalApp.build/Objects-normal/x86_64/DOPDropDownMenu.o
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Products/Debug-iphonesimulator/libDOPDropDownMenu-Enhanced.a(DOPDropDownMenu.o)
duplicate symbol OBJC_IVAR$_DOPDropDownMenu._origin in:
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Intermediates/agriculturalApp.build/Debug-iphonesimulator/agriculturalApp.build/Objects-normal/x86_64/DOPDropDownMenu.o
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Products/Debug-iphonesimulator/libDOPDropDownMenu-Enhanced.a(DOPDropDownMenu.o)
duplicate symbol OBJC_CLASS$_DOPIndexPath in:
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Intermediates/agriculturalApp.build/Debug-iphonesimulator/agriculturalApp.build/Objects-normal/x86_64/DOPDropDownMenu.o
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Products/Debug-iphonesimulator/libDOPDropDownMenu-Enhanced.a(DOPDropDownMenu.o)
duplicate symbol OBJC_METACLASS$_DOPIndexPath in:
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Intermediates/agriculturalApp.build/Debug-iphonesimulator/agriculturalApp.build/Objects-normal/x86_64/DOPDropDownMenu.o
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Products/Debug-iphonesimulator/libDOPDropDownMenu-Enhanced.a(DOPDropDownMenu.o)
duplicate symbol OBJC_IVAR$_DOPDropDownMenu._delegate in:
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Intermediates/agriculturalApp.build/Debug-iphonesimulator/agriculturalApp.build/Objects-normal/x86_64/DOPDropDownMenu.o
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Products/Debug-iphonesimulator/libDOPDropDownMenu-Enhanced.a(DOPDropDownMenu.o)
duplicate symbol OBJC_IVAR$_DOPDropDownMenu._dataSource in:
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Intermediates/agriculturalApp.build/Debug-iphonesimulator/agriculturalApp.build/Objects-normal/x86_64/DOPDropDownMenu.o
/Users/youpude/Library/Developer/Xcode/DerivedData/agriculturalApp-ebtktqjqltyjeegekhyqrvkfgmhp/Build/Products/Debug-iphonesimulator/libDOPDropDownMenu-Enhanced.a(DOPDropDownMenu.o)
ld: 20 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
swift怎么用这个?谢谢 我是新手
有二级菜单时,如果实现点击一级菜单不更新标题?
add tableFooterView will crash,not understand!
我的代码如下:
DOPIndexPath * indexPath = [DOPIndexPath indexPathWithCol:1 row:10 item:-1];
[self.menu selectIndexPath:indexPath];
诡异的是:col设置为0 是正常的,但是别的都不好使
我看了下从cocoapods上下载下来的版本和Git下载的版本不一样
最好能和autolayout一并使用
希望可以自定义箭头的图标、而不要用画上去的
如题,现在menu下都没有分割线,真的难看,我要自己改然后加进去..
想问下如果想给其中一个tableview,比如是第三个tableview加索引表怎么实现?
I almost spent a whole morning found out the solution to this problem, just add ceil(size.width), everything works well.
- (void)animateTitle:(CATextLayer *)title show:(BOOL)show complete:(void(^)())complete {
CGSize size = [self calculateTitleSizeWithString:title.string];
CGFloat sizeWidth = (size.width < (self.frame.size.width / _numOfMenu) - 25) ? size.width : self.frame.size.width / _numOfMenu - 25;
title.bounds = CGRectMake(0, 0, ceil(sizeWidth), size.height);
if (!show) {
title.foregroundColor = _textColor.CGColor;
} else {
title.foregroundColor = _textSelectedColor.CGColor;
}
complete();
}
设置这个在8.x系统上会崩溃,暂时注释掉了
如图, 在使用MJRefresh的下拉刷新时, 如果MJRefresh的下拉刷新菊花还在转, 这个时候同时去点击DOPDropDownMenu, 会使整个DOPDropDownMenu下降某一高度.
必现的事情
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.