shmxybfq / tfpopup Goto Github PK
View Code? Open in Web Editor NEW🚀🚀🚀TFPopup不生产弹框,它只是弹框的弹出工🚀🚀🚀默认支持多种动画方式一行调用,支持完全自定义动画.
License: MIT License
🚀🚀🚀TFPopup不生产弹框,它只是弹框的弹出工🚀🚀🚀默认支持多种动画方式一行调用,支持完全自定义动画.
License: MIT License
断点崩在 UIScrollView+TFPopup.m 文件的belongToPopupView方法中,堆栈看是因为循环了,一直调用了这个方法。
在框架中,inView(父界面)被强引用,而popView又加在inView上的,这可能导致循环引用问题。
手动收起是指,如果在某界面收到需要收起popView的事件,该界面又无法直接获取到popView,这时收起popView的功能就很复杂了。比如在子模块将popView弹到window上,首页收到了推送通知将跳转至另一模块,在首页只能遍历window上的子view,判断是否是popView,然后再调用tf_hide。多个子模块都可能弹不同的自定义弹框,这时首页就要写很多 if 来判断是不是要找的popView。
这个问题,最好是能直接调个框架类方法能一次性收起所有弹框,但是想了想似乎不好实现。看了下MBProgressHUD(旧版)的收起逻辑,它是指定收起哪个界面上的hud,而且它的hud都是MBProgressHUD类型,可以很好的判断。TFPopup并没有自定义遮罩View,遮罩和popView是平级的加在inView上,TFPopup无法判断inView上是否有弹框,也无法找到弹框,所以目前的实现方式好像是做不到统一收起弹框了。
TFPopup 占用了对 UIScrollView 的 gestureRecognizer 实现, 这不便于其它库或者程序本身
(可能还有相似问题)
Xib加载view。尺寸超出范围
经过尝试发现一个问题,当我要弹出的view上有输入框的时候,这个弹出的view添加在self.view上去弹出,点击输入框后IQKeyboardManager能够正常顶起输入框,但当我将弹出的view添加在当前的Window上时点击输入框后IQKeyboardManager不能够正常顶起输入框
希望作者有空的时候查看一下,谢谢。
调用tf_hide或者tf_remove时,不走dealloc的,在您的demo好像也没走dealloc
场景:同一时刻,可能有多个弹窗需要展示。
要求:
- 界面上只能展示一个,关闭其中一个才可以展示下一个;
- 展示到某个弹窗时,点击弹框的“确认”按钮,打开一个控制器页面,此时希望暂停队列里面的弹框,等当前页面关了,恢复剩下的弹框展示;
- 展示到某个弹窗时,点击弹框的“确认”按钮,打开一个控制器页面,此时不希望展示所有剩余弹框了,清空队列。
这么好的作品希望有更多人的star
custom?
:-)
如果是button直接加载到window是不会响应点击效果的,所以设置默认的背景按钮是没有用的
GeRenPKView *view = [GeRenPKView getNibView:@"GeRenPKView"];
view.userInteractionEnabled = YES;
view.backImage.userInteractionEnabled = YES;
view.popupDelegate = self;
TFPopupParam *param = [TFPopupParam new];
param.offset = CGPointMake(0, 0);
param.popupSize = CGSizeMake(kScreenWidth - 20 , 200);
param.disuseBackgroundTouchHide = NO;
param.dragEnable = YES;
param.dragStyle = DragStyleFree;
param.discernScrollEnable = YES;
self.geRenPKView = view;
[view tf_showScale:self.view offset:CGPointZero popupParam:param];
希望除了支持UIView之外还可以支持下UIViewController
设置disuseBackgroundTouchHide为NO,点击背景弹窗消失,popView也不销毁的,调用tf_hide可以销毁
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.