"001 UILabelで文字を表示" iOS app開発 習得日記 (5)


UIkitを覚えるために
こちらの写経がいいときいたので始めた
(http://docs.fabo.io/swift/uikit/001_uilabel.html)

001 UILabelで文字を表示

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.

        let bWidth: CGFloat = 200
        let bHeight: CGFloat = 50

        let posX: CGFloat = self.view.bounds.width/2 - bWidth/2
        let posY: CGFloat = self.view.bounds.height/2 - bHeight/2

        let label: UILabel = UILabel(frame: CGRect(x: posX, y: posY, width: bWidth, height: bHeight))

        label.backgroundColor = UIColor.orange

        label.layer.masksToBounds = true

        label.layer.cornerRadius = 20.0

        label.shadowColor = UIColor.gray

        label.textAlignment = NSTextAlignment.center

        self.view.backgroundColor = UIColor.cyan

        self.view.addSubview(label)



    }


}

selfは、ViewControllerのインスタンスを表しているのでよいのか?
また、

label.layer.masksToBounds

とドットを続けて書いているところがわからない。
labelインスタンスの layerプロパティのmasksToboundsプロパティということ?
プロパティのプロパティ?
どういうこと?