Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import UIKit
- class ViewController: UIViewController {
- override func viewWillAppear(_ animated: Bool) {
- super.viewWillAppear(true)
- view.backgroundColor = UIColor.gray
- let width = 50
- let height = 50
- for whiteValue in 0...7 {
- let size = CGSize(width: width, height: height)
- let origin = CGPoint(x: whiteValue * width, y: 100 + height * whiteValue )
- let frame = CGRect(origin: origin, size: size)
- let viewWhite = UIView(frame: frame)
- viewWhite.backgroundColor = UIColor.white
- view.addSubview(viewWhite)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement