Application
schedule 类别 子项 类别名称 优先级 数据包
contacts
entertainment
接触UIKit
import UIKit
let colors =
[
]
var backView = UIView(frame:CGRectMake(0.0,0.0,320.0,CGFloat(colors.count * 50)))
backView.backgroundColor = UIColor.blackColor()
backView
for(colorName,rgbTuple) in colors
{
var colorStripe = UILabel(frame:CGRectMake(0.0,CGFloat(index*50+5),40.0))
backView.addSubview(colorStripe)
index++
}
backView
原文链接:https://www.f2er.com/swift/327711.html