func testView(cread:()->Int,inview:(_ index:Int)->UIView) -> () {
let count = cread();
for i in 0..<count
{
let subview = inview(i);
view.addSubview(subview)
}
let count = cread();
for i in 0..<count
{
let subview = inview(i);
view.addSubview(subview)
}
}
testView(cread: { () -> Int in
return 20;
}) { (index) -> UIView in
let b = UILabel();
b.textColor = UIColor.red;
b.text = "我的是的";
b.frame = CGRect(x: 0, y: 60+index*60, width: 200, height: 40)
return b;
}