 //        footerView.beginRefreshing()
         
     }
+    private func setupTipLabel(){
+        //1.给label添加父控件
+        navigationController?.navigationBar.insertSubview(tipLabel, atIndex: 0)
+        //2.设置frame
+        tipLabel.frame = CGRect(x: 0, y: 12, width: UIScreen.mainScreen().bounds.width, height: 32)
+        //3.设置属性
+        tipLabel.backgroundColor = UIColor.orangeColor()
+        tipLabel.textColor = UIColor.whiteColor()
+        tipLabel.font = UIFont.systemFontOfSize(14)
+        tipLabel.textAlignment = .Center
+        tipLabel.hidden = true
+    }
+    
 }
 
 

    private lazy var popoverAnimator : PopoverAnimator = PopoverAnimator() // 动画管理的对象
    private lazy var statusViewModels : [StatusViewModel] = [StatusViewModel]()
    private lazy var cellHeightCache : [String : CGFloat] = [String : CGFloat]()
    
    //记录菜单是否展开
    var isPresent :Bool = false

            //2.header、footer停止刷新
            self.tableView.mj_header.endRefreshing()
//            self.tableView.mj_footer.endRefreshing()
            
            //3.显示tipLabel
            self.showTipLabelAni(models.count)
        }
    }

    
    private func showTipLabelAni(count: Int){
        //1.设置label属性
        tipLabel.hidden = false
        tipLabel.text = count == 0 ? "没有新微薄" : "\(count)条新微博"
        //2.执行动画
        UIView.animateWithDuration(1.0, animations: { () -> Void in
            
            self.tipLabel.frame.origin.y = 44
            }) { (_) -> Void in
                
                UIView.animateWithDuration(1.0, delay: 1.0, options: [], animations: { () -> Void in
                    self.tipLabel.frame.origin.y = 12
                    }, completion: { (_) -> Void in
                        self.tipLabel.hidden = true
                })
        }
        
        
    }
}
