Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lyb5834/YBPopupMenu
快速集成popupMenu
https://github.com/lyb5834/YBPopupMenu
bubble bubbles menu pop popup popup-menu qq wechat weixin
Last synced: about 1 month ago
JSON representation
快速集成popupMenu
- Host: GitHub
- URL: https://github.com/lyb5834/YBPopupMenu
- Owner: lyb5834
- License: mit
- Created: 2016-11-09T02:58:30.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-09T03:23:39.000Z (7 months ago)
- Last Synced: 2024-09-16T04:02:42.278Z (3 months ago)
- Topics: bubble, bubbles, menu, pop, popup, popup-menu, qq, wechat, weixin
- Language: Objective-C
- Homepage:
- Size: 3.11 MB
- Stars: 878
- Watchers: 18
- Forks: 175
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-iOS - YBPopupMenu - 快速集成 popupMenu (UI Components)
README
# YBPopupMenu
* 快速集成popupMenu# 效果图
![(演示效果)](https://lyb5834.github.io/Images/YBPopupMenuGif.gif)# cocoapods支持
* 只需在`Podfile`中加入`pod 'YBPopupMenu'`后`pod install`即可# SwiftPackageManager(SPM)支持
# 最近更新
* 新增箭头样式| 样式 | 图例 |
|------|------|
| `YBPopupMenuArrowStyleCurve` **默认** | ![curve](https://lyb5834.github.io/Images/curve_arrow.png) |
| `YBPopupMenuArrowStyleStraight` | ![straight](https://lyb5834.github.io/Images/straight_arrow.png) |* 增加了高斯模糊视图
# 之前更新
* 修复了快速点击屏幕动画重复执行的问题
* 增加了`dismissAllPopupMenu` 方法,方便一键隐藏所有popupMenu
* 删除老版初始化方法,避免频繁调用`[self updateUI]`方法
* 增加横竖屏适配
* 增加可选择的动画,暂时只有`YBPopupMenuAnimationStyleScale` 和 `YBPopupMenuAnimationStyleFade`两种,可自定义
* 代码全部重构,不过完全兼容原先的API接口
* 增加了`YBPopupMenuPriorityDirection`属性,可以设置箭头的第一优先级方向,当将要超过屏幕时会自动反转方向
* 增加了`rectCorner`属性,可以自定义圆角(当反转时会自动镜像的反转圆角)
* 可以设置边框颜色,边框粗细等
* 支持传入`NSAttributedString`
* 开放部分私有属性,如`titles`,`images`,`tableView`,`minSpace`等等
* 点击回调方法有更新(旧的还可以用)
* 增加可自定义Cell的回调,遇到奇葩需求可以自定义设置(具体使用方法可参考demo)# 注意
1. 当箭头优先级是`YBPopupMenuPriorityDirectionLeft`/`YBPopupMenuPriorityDirectionRight`/`YBPopupMenuPriorityDirectionNone`时需手动设置`arrowPosition`来设置箭头在该行的位置
2. 边框宽度不宜过粗,影响美观# 使用方法
* `#import "YBPopupMenu.h"`
```
[YBPopupMenu showAtPoint:p titles:TITLES icons:nil menuWidth:110 otherSettings:^(YBPopupMenu *popupMenu) {
popupMenu.dismissOnSelected = NO;
popupMenu.showShadow = YES;
popupMenu.delegate = self;
popupMenu.offset = 10;
popupMenu.type = YBPopupMenuTypeDark;
popupMenu.rectCorner = UIRectCornerBottomLeft | UIRectCornerBottomRight;
popupMenu...;
}];
```# 版本支持
* `xcode7.0+`* 如果您在使用本库的过程中发现任何bug或者有更好建议,欢迎 [@issues](https://github.com/lyb5834/YBPopupMenu/issues) 我或联系本人email [email protected]