习惯:错误

1,多整frame,

忘了配色吧。UIColor,吃撑了一样。
想起Color,就想起Frame,LayOut

FRAME

 init(frame: CGRect, index: Int) {
        super.init(frame: frame)
        titleLabel = UILabel.createLabel("\(index)", font: UIFont.systemFontOfSize(12), textAligment: .Center, textColor: UIColor.blackColor())
        
        titleLabel?.frame = self.bounds
        
        addSubview(titleLabel!)
        backgroundColor = UIColor.init(white: 0.8, alpha: 1)
    }

2,

oldView
Remove


 //MARK:- func showData(){
    func showData(){   
        for oldSub in contentView.subviews{
            oldSub.removeFromSuperview()
        }    
        var cnt = number!

3,ContainerView

Cell的 ContainerView,不要 忘记。

 for i in 0..

你可能感兴趣的:(习惯:错误)