- 男
- 1989–11-29
- 广西·贺州【现居深圳民治】
- 158 1404 5532(广东·深圳 移动)
- [email protected]
- 本科 - 毕业于 南昌航空大学
whde / alert Goto Github PK
View Code? Open in Web Editor NEW兼容iOS7及以上的消息提醒视图, 支持Block和Delegate
License: MIT License
兼容iOS7及以上的消息提醒视图, 支持Block和Delegate
License: MIT License
设置self.window.rootViewController 后对话框不显示
下面是修复方案
- (void)show {
dispatch_async(dispatch_get_main_queue(), ^{
[self needsDisplay];
UIWindow *window = ((UIWindow *)[[UIApplication sharedApplication] windows][0]);
[window addSubview:self];
[window endEditing:YES];
[self performPresentationAnimation];
});
}
修改为
- (void)show {
dispatch_async(dispatch_get_main_queue(), ^{
[self needsDisplay];
UIWindow *window = ((UIWindow *)[UIApplication sharedApplication].keyWindow);
[window addSubview:self];
[window endEditing:YES];
[self performPresentationAnimation];
});
}
_alertView = [[UIToolbar alloc] init];
之后加
[_alertView layoutIfNeeded];
经测试可用!
if (hasCancelBtn == YES ){
[button addTarget:self action:@selector(cancalClick:) forControlEvents:UIControlEventTouchUpInside];
}else{
[button addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchUpInside];
}
处理的事情,只要有cancel的按钮,所有的按钮都执行的是cancelclick事件,导致了,点击了不是cancel的按钮都会执行cancel事件
app横屏仍然会是竖屏的alert
iOS 11 系统在 UIToolBar 中添加了contentView 和 stackView 了!你猜会发生什么!
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.