UILabel issue - position

Hi there,

The problem is that when I just drag and change the position of my label in xib, it does not effect properly in my app.

@IBOutlet weak var Example: UILabel! is connected to the label in xib file.

In total there are 3 labels, so I want to see them normal, but now it looks like the first label is inside the second label. The second and third label has huge spacing, and they are in very center. The first label is on very left side.

Appreciate your ideas.

Replies

Did you define constraints to position labels ?

Or you could also insert them in a stack (horizontal or vertical)

And please show code or show how the xib is defined, it is hard to give precise advice otherwise.

  • Well, they are inside UIView. There is one picture (32px to 32px), and three labels. I gave constraints to position, but still. In xib it looks perfect, but on the app it is messed up.

    Will share here code

  • I cannot see code… Could you also post a copy of the xib, a copy of the constraints and an app screenshot.

Add a Comment