5

I have a tedious problem.

I create a ContainerView that is embed with a UIStackView.

Inside this stack view I insert through the method "addArrangedSubview" several UIView that execute this line of code "NSBundle.mainBundle().loadNibNamed". One of this UIView has inside a NIB that has inside it an UIImageView that cover all the space and does not have margins. The image is loaded with the Kingfisher library with an URL.

The problem is the following: My Problem

How can I remove that white spaces?

EDIT: The UIImageView has Aspect Fit proprerty. If I choose Scale To Fill the padding disappear. Then I understand that the view is drawn before the application of Aspect Fit. How can I handle this situation?

linosorice
  • 166
  • 1
  • 12
  • Can you delineate the bounds of the stack view more clearly? Aspect Fit stops stretching content when it meets either vertical or horizontal bounds. – royalmurder Oct 03 '17 at 15:06

0 Answers0