layer.needsLayout()
let view = UIView() view.layer.needsLayout() view.setNeedsLayout() view.layer.needsLayout()