import Foundation
extension UIColor{
/// 随机色
static var randomColor:UIColor{
get{
let red = CGFloat(arc4random()%256)/255.0
let green = CGFloat(arc4ran ...……
setter 和getter 的使用--amp;amp;gt; 适合计算使用
struct Point {
var x = 0.0, y=0.0
}
struct Size {
var width = 0.0, height = 0.0
}
struct Rect {
var orgin = Point()
var size ...……