zoukankan      html  css  js  c++  java
  • ios23--动画做弹出提示框toast

        if (self.shopCarView.subviews.count == 0) {
            /*
            [UIView animateWithDuration:2.0 animations:^{ // 执行动画
                self.showHUB.text = @"当前购物车已空,赶紧买买买~";
                self.showHUB.alpha = 1.f;
            } completion:^(BOOL finished) { // 完成
                [UIView animateWithDuration:1.0 delay:1.0 options:UIViewAnimationOptionCurveLinear animations:^{
                    self.showHUB.alpha = 0;
                } completion:nil];
            }];
            */
            [self showWithInfo:@"当前购物车已空,赶紧买买买~"];
        }
    }
    
    @property (weak, nonatomic) IBOutlet UILabel *showHUB; //提示文字,刚开始是隐藏的。连线连过去的。
    
    - (void)showWithInfo: (NSString *)info{
        [UIView animateWithDuration:2.0 animations:^{ // 执行动画
            self.showHUB.text = info;
            self.showHUB.alpha = 1.f;
        } completion:^(BOOL finished) { // 完成
            [UIView animateWithDuration:1.0 delay:1.0 options:UIViewAnimationOptionCurveLinear animations:^{
                self.showHUB.alpha = 0;
            } completion:nil];
        }];
    }
  • 相关阅读:
    Java/android下哈希sha1和MD5的实现
    ANDROID SOCKET 开发
    UML补充
    TCP协议中的三次握手和四次挥手(转)
    uva 658 最短路
    uva 11280 最短路
    uva 10246 最短路
    uva 11747,kruskal 并查集
    uva 544 dijkstra
    uva 1395 瓶颈树
  • 原文地址:https://www.cnblogs.com/yaowen/p/7469657.html
Copyright © 2011-2022 走看看