import UIKit
import Foundation
class MyView: UIView {
// var acolor :UIColor
/*
// Only override draw() if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
override func draw(_ rect: CGRect) {
// Drawing code
}
*/
// private var cancelButtonTitle: String!;
// private var destructiveButtonTitle: String!;
// private var otherButtonTitles: [String]!;
//
override init(frame: CGRect) {
// cancelButtonTitle = String()
// destructiveButtonTitle = String()
// otherButtonTitles=[String]()
super.init(frame:frame)
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)!;
}
//convenience可选够造初始
convenience init(acolor:UIColor) {
self.init(frame: CGRect.zero)
// self.cancelButtonTitle = cancelButtonTitle;
// self.destructiveButtonTitle = destructiveButtonTitle;
// self.otherButtonTitles = otherButtonTitles;
self.backgroundColor = acolor
// prepareUI();
}
}