Today I wrote a list using Masnory and found a problem. I would like to retrieve the navigation view. I would like to retrieve the navigation view. I would like to retrieve the navigation view.

This is because the view fream and bounds are 0 after you use navigation, so rounded corners will not work.

Solution: After setting the constraints on the control, call layoutIfNeeded to layout the control. Then the constrained control will generate the corresponding frame and bounds for the current layout according to the constraints. This allows you to use these two attributes to round the image [self layoutIfNeeded]; / / this code is very important, can’t forget [self useBezierPathClipCornerWithType: UILayoutCornerRadiusTop WithCornerRadius: AdaptedWidth (5)]; Here are some of the differences in autolayout update methods:

SetNeedsLayout: Tells the page that it needs to be updated, but does not start updating immediately. LayoutSubviews is called immediately after execution. LayoutIfNeeded: Notifies the page layout to be updated immediately. So it's usually used with setNeedsLayout. You need to call this method if you want to generate a new frame immediately, so you can use this method to animate a general layout animation after updating the layout. Rewrite layout setNeedsUpdateConstraints layoutSubviews: system: told that need to be updated, but not immediately start updateConstraintsIfNeeded: inform immediately update constraint updateConstraints: System update constraintCopy the code