import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.initView()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
// MARK:-initView
func initView() {
var view = UIView()
view.frame = CGRectMake(0, 0, 100, 100)
view.backgroundColor = UIColor.redColor()
self.view.addSubview(view)
}
}
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.initView()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
// MARK:-initView
func initView() {
var view = UIView()
view.frame = CGRectMake(0, 0, 100, 100)
view.backgroundColor = UIColor.redColor()
self.view.addSubview(view)
}
}