Skip to content

Instantly share code, notes, and snippets.

@sanllier
Last active March 21, 2018 18:12
Show Gist options
  • Select an option

  • Save sanllier/96cf1062422ad029b910080964e4e34b to your computer and use it in GitHub Desktop.

Select an option

Save sanllier/96cf1062422ad029b910080964e4e34b to your computer and use it in GitHub Desktop.
override func systemLayoutSizeFitting(
    _ targetSize: CGSize,
    withHorizontalFittingPriority horizontalFittingPriority: UILayoutPriority,
    verticalFittingPriority: UILayoutPriority) -> CGSize
{
// Прокинуть верный размер с учетом отступов
(content as? ASLabel)?.fittingSize = computeContentTargetSize(for: targetSize)
return super.systemLayoutSizeFitting(...)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment