仿新浪自动刷新完后消息下拉的效果

2015-04-29 0 846
仿新浪自动刷新完后消息下拉的效果
/**
     *消息背景控件label
     */
    self.loveLabel=[[UILabel alloc]initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 40)];
    self.loveLabel.backgroundColor=[UIColor orangeColor];
    self.loveLabel.text=@"哇哦,共获取到两条好友的动态哦^_^";
    self.loveLabel.textAlignment=1;
    self.loveLabel.font=[UIFont systemFontOfSize:15];
    [self.imageView insertSubview:self.loveLabel belowSubview:self.topLabel];
    /**
     *UIView成功显示动画
     */
    [UIView animateWithDuration:2 animations:^{
        self.loveLabel.frame=CGRectMake(0, 40, self.view.bounds.size.width, 40);
    } completion:^(BOOL finished)
     {
         [UIView animateWithDuration:2 delay:1 options:UIViewAnimationOptionCurveLinear animations:^{
             self.loveLabel.frame=CGRectMake(0, 0, self.view.bounds.size.width, 40);
         } completion:^(BOOL finished) {
             [self.loveLabel removeFromSuperview];
         }];
         
     }];

遇见资源网 objective-c 仿新浪自动刷新完后消息下拉的效果 http://www.ox520.com/16632.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务