Chapter 15 iOS apprentice v 7 reading data

I have successfully written and read the .plist file but when I open a file the text of the list items that were checked are right justified. this only happens when reading from a file. any idea what is wring?

One thing you can do is check your project against the provided final project in the book if you want to troubleshoot the issue yourself.

Alternatively, please upload your project as a ZIP file somewhere and provide a link to the ZIP file so that I (or someone else) can download the file and see what might be going on.

hello here is a link to my code on github. I think it is my constraints but I am having problems fixing it

It is your auto layout constraints. See the following image:

The red rectangle around an element in the storyboard indicates that you have auto layout issues and if you check the other red rectangle in the sidebar highlighting some of the autolayout constraints, you’ll notice that you have at least three bottom layout constraints and that at least two are for different values :slight_smile:

Since iOS can’t satisfy both constraints (one is for 1pt bottom padding and the other is for 11pt bottom padding) it will run into issues. And there are other auto layout constraint issues as well.

So check each element, remove the duplicate/conflicting auto layout constraints, go back over the steps in the book for setting the constraints in the first place to see if you have all of them in place and then see if the code works correctly.

1 Like

Thanks you that’s really helpful

This topic was automatically closed after 166 days. New replies are no longer allowed.