底部提示框
来源:互联网 发布:nginx server log配置 编辑:程序博客网 时间:2024/06/05 07:53
[self toastCenter:@"退出登录成功" during:2.0];
#pragma mark - Toast
- (void)toastCenter:(NSString *)message during:(NSTimeInterval)time
{
AppDelegate *del = (AppDelegate *)[UIApplicationsharedApplication].delegate;
UIWindow *keyWindow = del.window;
CGSize size = [message sizeWithFont:[UIFontsystemFontOfSize:15] constrainedToSize:(CGSize){1000,20}];
UILabel *tost = [[UILabel alloc] initWithFrame:(CGRect){0,K_SCREEN_HEIGHT + 20 ,size.width + 20,35}];
tost.center = keyWindow.center;
tost.textAlignment = NSTextAlignmentCenter;
tost.font = [UIFont systemFontOfSize:15];
tost.textColor = [UIColor whiteColor];
tost.backgroundColor = [UIColor grayColor];
tost.text = message;
tost.alpha = 0.9;
tost.layer.cornerRadius = 4;
tost.layer.masksToBounds = YES;
tost.layer.shadowColor = [UIColor blackColor].CGColor;
tost.layer.shadowOffset = CGSizeMake(0, 0.45);
tost.layer.shadowOpacity = 0.45;
tost.frame = CGRectMake(tost.frame.origin.x,K_SCREEN_HEIGHT + 20 ,size.width + 20,35);
[keyWindow addSubview:tost];
[UIView animateWithDuration:0.35 animations:^{
tost.frame = CGRectMake(tost.frame.origin.x,K_SCREEN_HEIGHT - 90, tost.frame.size.width, tost.frame.size.height);
} completion:^(BOOL finished) {
[UIView animateWithDuration:0.2 animations:^{
tost.frame = CGRectMake(tost.frame.origin.x,K_SCREEN_HEIGHT - 85, tost.frame.size.width, tost.frame.size.height);
} completion:^(BOOL finished) {
if (finished) {
[UIView animateWithDuration:timeanimations:^{
tost.alpha = 0;
} completion:^(BOOL finished) {
[tost removeFromSuperview];
}];
}
}];
}];
}
- 底部提示框
- 界面底部弹出提示框
- 层模型--固定定位(参考医院网站底部提示框)
- android 底部弹出提示框的实现方式
- Swift开发---toast 界面底部显示的提示框
- ios屏幕底部弹出提示
- android 实现由下至上弹出并位于屏幕底部的提示框
- android 实现由下至上弹出并位于屏幕底部的提示框
- 由下至上弹出并位于屏幕底部的提示框
- android 实现由下至上弹出并位于屏幕底部的提示框
- android 实现由下至上弹出并位于屏幕底部的提示框
- Android 实现由下至上弹出并位于屏幕底部的提示框
- Android 底部弹出提示框的解决办法(使用Activity以及PopupWindow)
- Android 实现由下至上弹出并位于屏幕底部的提示框
- Android 实现由下至上弹出并位于屏幕底部的提示框
- android 实现由下至上弹出并位于屏幕底部的提示框
- android 实现由下至上弹出并位于屏幕底部的提示框
- android 实现由下至上弹出并位于屏幕底部的提示框【转】
- mongodb学习笔记
- jQuery学习笔记(五) jQuery UI按钮,进度条以及滑动条
- Hrbust 1389 JiaozhuV5 Substrings【思维+大模拟+细心+细心】窝为什么要做这种题T T
- 测试我的第一个博客
- adb 命令查看 包名 对应包名 apk
- 底部提示框
- Java基本数据类型
- HTTP之Cookie
- 代码结构
- iOS 开发之 点击tabbarItem添加是否跳转登录页面判断
- OpenGL 纹理本质
- 传统投顾解决不了的问题,智能投顾也许能起到推动作用
- javascript二叉查找树
- button防止被重复点击的相关方法(详细版)