Invalidates the layer’s layout and marks it as needing an update.
- iOS 2.0+
- macOS 10.5+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- Core Animation
You can call this method to indicate that the layout of a layer’s sublayers has changed and must be updated. The system typically calls this method automatically when the layer’s bounds change or when sublayers are added or removed. In macOS, if your layer’s
layout property contains an object that implements the invalidateLayout(of:) method, that method is called too.
During the next update cycle, the system calls the
layout method of any layers requiring layout updates.