You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
[ios] Replace ornament margin assert with NSException (follow on to #13911) #14065
We typically use NSExceptions when alerting the developer of programmer error; in our release SDK, asserts will be "compiled out" (so will be a no-op). Asserts are useful for those developing the SDK itself.
As discussed, the margin (offset) is a vector quantity, not a point. Given that the margin is an inset from mgl_safeTopAnchor (and related anchors), it's possible to have a valid margin but the assert to fire. This check needs to take the anchors into consideration.
@julianrex The purpose of those asserts is making sure ornaments in proper positions. Seems layoutSubviews is a good position to guard that. Here is my attempt #14373. Looking forward to your suggestions. 😊 cc: @chriswu42
Activity
lloydsheng commentedon Apr 9, 2019
@julianrex The purpose of those asserts is making sure ornaments in proper positions. Seems
layoutSubviewsis a good position to guard that. Here is my attempt #14373. Looking forward to your suggestions. 😊 cc: @chriswu42