Ok, lets start with the solution project for chapter 15. select HomepwnerItemCell.xib in the navigator. now select the item name field, and with the size inspector, change the width to 180. Do the same with the serial number field. Now go to the file inspector, and enable the “Use Autolayout” checkbox. Now build and run. Create an entry and give it a value of 9001. The format it displays is as below, with the value out of the bounds of the cell:
Now, if you turn off autolayout, you can use the springs and such and make it look right. My question is, why is it doing this with autolayout turned on, and how do we fix it so it looks right? I’ve tried a number of tweeks to make it look right, but haven’t found the secret yet. The constraints listed in the size inspector seem to indicate that it SHOULD work, but it doesn’t. (note, changeing the width of the name and serial number labels is necessary, or else autolayout uses leading space constraints instead of the trailing space constraint.) Or is autolayout really just that useless that we should always avoid it?