ios实现toast

来源:互联网 发布:java常见面试题集合 编辑:程序博客网 时间:2024/06/06 08:13

-(void)toast :(NSString*) s{

      toast.hidden=NO;

   // [UIView animateWithDuration:1.5 animations:^{} completion:<#^(BOOL finished)completion#>];

    [UIViewanimateWithDuration:1.5animations:^{

        toast.text=s;

        toast.alpha=0;

    }completion:^(BOOL fin){

    toast.alpha=1;

        toast.hidden=YES;

    }];

}

0 0
原创粉丝点击