Baseline Constraint - Auto Layout bug issue


#1

In the note before the Intrinsic Content Size section, it says to delete the baseline constraint because my value textfield is missing. I click on the constraint, then control-click and drag from the textfield to the value label and select Center Y. When I do that and run the app, the serial number, serial number text field, value label, and value textfields disappear when running the app. What gives?


#2

I have been having all kinds of trouble following the steps in the book.
Twice I ended up simply openening the project in the solutions rar I downloaded and mimicking the constraints they have set there.


#3

Ive tried that too but still no luck…


#4

Sure would be nice for a moderator or author of this book to chime in and give a solution to this.

Seriously!!!

I’ve worked back through the chapter and ALSO looked at the provided solution. My app still does the same damn thing. What’s the deal? Why is the provide app working but on my app, the value text field still disappears!!!

:imp: :angry:


#5

Actually, I think you might do well to read the comment on page 314.


#6

[quote=“Arthurzwit”]Actually, I think you might do well to read the comment on page 314.

Yep, double check that you’ve done this. You should be able to select the valueField and open its Size Inspector to see all of its constraints. Working through the 4th edition (1st printing), these are the ones I see: cl.ly/image/0a352d3L2k21


#7

Had the same problem, glad this forum is here to help point out what was already in the book.

For those of you running into multiple placement or sizing issues (as I did), go back to the XIB, select each component one at a time and delete all constraints. Walk back through the book’s sequence starting on page 289 with the toolbar. Do them one at a time, make sure you add all the needed constraints on a single component before moving on to the next placement.

Once everything is in place, go back and apply the change in the note on the bottom of page 314 to the value text field. This is what is making the value field (and possible the date label as well) disappear when a large image is selected.

I had to walk through this twice to get it to work. If you’re frustrated take a break, walk away, come bakc when you’re fresh. But always start with a fresh slate - remove all the constraints first.

Regards,

Mark H