Comments (6)
怎么会连续弹出两个view?能说下具体情况吗 或是你的使用场景是什么样的?
from zhpopupcontroller.
在网络请求失败的时候弹窗,然后一个页面有2个请求,没网络状态会弹2个
from zhpopupcontroller.
SnailAlertView *alert = [[SnailAlertView alloc] initWithTitle:title message:message fixedWidth:300];
alert.linesHidden = YES;
SnailAlertButton *can = [SnailAlertButton cancelButtonWithTitle:cancelTitle handler:cancel];
can.edgeInset = UIEdgeInsetsMake(20, 20, 20, 20);
can.backgroundColor = [UIColor whiteColor];
[can.layer setBorderColor:[[UIColor blackColor] CGColor]];
can.layer.borderWidth = 0.5;
[can.layer masksToBounds];
[can setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[alert addAction:can];
AppDelegate *ad = (AppDelegate*)[UIApplication sharedApplication].delegate;
ad.window.sl_popupController = [SnailPopupController new];
ad.window.sl_popupController.maskType = PopupMaskTypeBlackBlur;
ad.window.sl_popupController.transitStyle = PopupTransitStyleShrinkInOut;
[ad.window.sl_popupController presentContentView:alert duration:0.5 elasticAnimated:YES];
from zhpopupcontroller.
ad.window.sl_popupController = [SnailPopupController sl_popupController];
用这个初始化,会有个蒙版消失不了.检查视图发现还是2个view.dismiss不掉.
from zhpopupcontroller.
-
(void)buttonClicked:(UIButton *)sender {
NSString *selName = [NSString stringWithFormat:@"example%lu", sender.tag + 1];
SEL sel = NSSelectorFromString(selName);
if ([self respondsToSelector:sel]) {
self.title = _styles[sender.tag];
[self performSelector:sel withObject:nil afterDelay:0];
[self performSelector:sel withObject:nil afterDelay:0]; // 在demo中连续调用2次就会出现.}
}
from zhpopupcontroller.
确实有这个问题,我已经做了修改。
不过叠加弹出窗口应该是不合理的,另外这样操作相当于创建了两个不同的对象赋给了self.sl_popupController ,所以前一个已经delloc了 ,但是视图没有消失(这是个bug)。如果非要同时叠加多个,应该创建多个不同的全局变量来保存每个对象。
from zhpopupcontroller.
Related Issues (20)
- zhPopupLayoutTypeCenter 这个属性只会弹出来一次,第二次就出不来了 HOT 5
- 2次弹出视图,本来控制器能旋转的。不能了为啥
- 点击自定义view的是时候怎么移除zhPopupController
- 弹出的视图内包含UITextView,当UITextView成为第一响应者后,视图上移的位置不准确 HOT 3
- Textfield 弹出键盘 视图位置不正确 HOT 2
- 打断点 zhPopupController init方法都没有调用 咋回事???
- 你好,我想问个问题
- 在已经弹出的视图上再弹出一个视图。
- self.zh_popupController.maskTouched
- App进入后台时候,通过网络请求或者推送触发的弹窗会无法点击 HOT 2
- 大佬,有swift版本的吗 HOT 1
- 弹窗控制器的view代理方法问题
- 先调用dismiss会导致界面出现挡板 遮住无法操作
- 1.0.x的版本标签建议开回来。。。
- 是否可以实现类似淘宝或京东点击滚动条上的筛选条件从滚动条下方显示,而不是从屏幕最上方显示 HOT 1
- 横竖屏切换时的bug
- 横竖屏切换存在BUG HOT 1
- 拖拽手势的判定逻辑需要优化 HOT 1
- 首页界面弹窗调用[[zhPopupController alloc] initWithView:customView size:alert.bounds.size];这个初始化两次会弹窗两次,怎么实现只弹一次
- iOS17适配 HOT 1
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 zhpopupcontroller.