Comments (12)
我开个分支
from ftpopovermenu.
想了一下,好像架构完全不一样了,这个需求是否完全必要,或者截至时限有多久?我在考虑重新写。
from ftpopovermenu.
我本来也想改你源码来着,看了一下目前里面的架构只能支撑单个弹窗,没法改,就先用单弹窗做了考虑以后撸,不急。
另外,我发现如果弹窗箭头是朝下的话,背景是类似白色的浅色,最后一个分割线很碍眼。如下图:
然后我考虑在判断到方向后,tableView上添加一个视图覆盖掉最后那个分割线,代码如下(196行):
if (_arrowDirection == FTPopOverMenuArrowDirectionDown) {
menuRect = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height - FTDefaultMenuArrowHeight);
// 遮住最后的白线 by Haley 2016-11-17
UIView *lineView = [self viewWithTag:201];
if (!lineView) {
lineView = [[UIView alloc] initWithFrame:CGRectZero];
}
lineView.frame = CGRectMake(5, menuRect.size.height-2, menuRect.size.width - 10, 2);
lineView.tag = 201;
lineView.backgroundColor = [FTPopOverMenuConfiguration defaultConfiguration].tintColor;
[self insertSubview:lineView aboveSubview:self.menuTableView];
}
[self.menuTableView setFrame:menuRect];
[self.menuTableView reloadData];
其实就算是朝上的,也可以遮住最后的分割线。关于遮盖分割线的视图宽高位置,以及用tag还是属性view,还有必要性,你考虑一下。最后的效果是这样的:
from ftpopovermenu.
我这边是要实现微信公众号底部菜单的效果。
from ftpopovermenu.
试试这几行代码:
if (indexPath.row == _menuStringArray.count-1) {
menuCell.separatorInset = UIEdgeInsetsMake(0, self.bounds.size.width, 0, 0);
}else{
menuCell.separatorInset = UIEdgeInsetsMake(0, FTDefaultMenuTextMargin, 0, FTDefaultMenuTextMargin);
}
from ftpopovermenu.
这个更改已经发布了1.2.3版本
from ftpopovermenu.
你这个处理效果更优!
from ftpopovermenu.
分割线左边距并不是设置的宏的值6,不知道你这边有更优雅的做法么?我是把后面改成了10+宏值。
from ftpopovermenu.
后来提交的代码里面其实是可以随意设置的,可能170行左右这行代码需要注释掉:
_menuTableView.separatorInset = UIEdgeInsetsMake(0, FTDefaultMenuTextMargin, 0, FTDefaultMenuTextMargin);
from ftpopovermenu.
@liufengting 测试了10月14号我下载的版本,和刚下的版本,得出的结果是在iOS 10以上分割线正常,在iOS 10以下(测了iOS 9),分割线前面有固定15的距离。
from ftpopovermenu.
那应该是系统的限制吧,这个不太好解决,我去查查看吧。
from ftpopovermenu.
刚才看到一个帖子希望有些帮助,我还没有测试过,你也试试看吧希望能解决iOS9上的这个问题。
from ftpopovermenu.
Related Issues (20)
- 可以把 FTDefaultMenuCornerRadius 改成 头文件可变属性么? HOT 2
- 建议:提供设置分割线间距separatorInset,默认的间距会影响UI的的效果 HOT 2
- 考虑添加更为精细的图片缓存机制
- Dismiss block calling HOT 3
- separatorInset 左侧无法顶头 HOT 1
- MultiSelect support? HOT 1
- What should i do for without dismiss function block? HOT 1
- 自定义Icon大小 HOT 1
- selectedCellBackgroundColor无效 HOT 1
- IphoneX 上的UIBarButtonItem定位兼容不好 HOT 1
- FTDefaultMargin自定义 HOT 1
- 有一个不需要背景View的需求,如果可以希望能够支持
- 组件化依赖FTPopOverMenu出错问题 HOT 2
- 当菜单项很多,出现滚动条时,高度错误。 HOT 1
- Sometimes can't dismiss the menu
- 可以支持下固定高度吗?
- 如何调整宽度 HOT 1
- 关于设置coverBackgroundColor显示效果问题
- 按钮动画的缩放偶现效果会被中断 HOT 4
- 支持横向菜单吗
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ftpopovermenu.