iOS

【iOS】frameとboundsの違いを一言で

何回聞いても忘れるので。 frame は親ビューから見た相対座標 bounds はビュー自身の座標系から見た座標 子ビューには bounds を渡す。 let child = UIView() child.frame = self.bounds