Greg Peckory
Greg Peckory

Reputation: 8068

Views not appearing on iPhone as they do in Storyboard

In the storyboard I have the views set up like this:

enter image description here

Now I have some code which changes the text and image background color etc. but no size changes are in the code.

This is how it turns out on the iPhone:

enter image description here

You see the 'published by' just decides to resize its width for no reason.

I have tried adding all missing constraints,

I have tried adding a constraint for 'same width' for the body view and the 'published by' view.

Nothing.

Can anyone give me an explanation why something like this might happen?

Upvotes: 0

Views: 41

Answers (2)

Pravin Tate
Pravin Tate

Reputation: 1130

enter image description here

set publication button constraint as per screenshot. I hope it will help you and will solve your problem.

Upvotes: 1

Fred Faust
Fred Faust

Reputation: 6800

Just using a bottom & leading worked for me as shown.

enter image description here

Upvotes: 1

Related Questions