Waqas-Hirose / CustomViewPractice

This is Custom View Practice. A view is created with 4 subviews and without using constraints.
1 stars 0 forks source link

intrinsicContentSizeについて #7

Closed matsumoto777 closed 4 years ago

matsumoto777 commented 4 years ago
    override func sizeThatFits(_ size: CGSize) -> CGSize {
        let labelSize = self.lbl.intrinsicContentSize
        let switchSize = self.switchView.intrinsicContentSize

ここでsizeThatFitsではなくintrinsicContentSizeを使った理由を教えて下さい。

Waqas-Hirose commented 4 years ago

I have replace it with "sizeThatFits"