# Constraints not working in either of last two xcode versions

**URL:** <https://forums.kodeco.com/t/constraints-not-working-in-either-of-last-two-xcode-versions/22807>\
**Category:** iOS Apprentice\
**Created:** [November 17, 2016, 6:46pm UTC](https://forums.kodeco.com/t/constraints-not-working-in-either-of-last-two-xcode-versions/22807 "2016-11-17T18:46:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chappers](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/chappers/32/58485_2.png) [@chappers](https://forums.kodeco.com/u/chappers)\
**Post date:** [November 17, 2016, 6:46pm UTC](https://forums.kodeco.com/t/constraints-not-working-in-either-of-last-two-xcode-versions/22807/1 "2016-11-17T18:46:25Z")

</div>

I am new to iOS dev and working on the apprentice Tutorial 2. I cannot seem to get the constraints to stick. As soon as i flick the orientation and change device some if not all are not responding as they should

I just setup a quick project to mess around with constraints. I have a slider at the top and a table view covering the remainder of the screen

I constrain the slider to the top of the screen using the 3 lines (this always works) whatever the device and orientation

Then when i constrain the Table View on all 4 sides and and change device it only fills up a portion of the screen

Im sure its something silly im doing

---

<div class="post-metadata">

**Author:** ![hollance](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/hollance/32/109009_2.png) [@hollance](https://forums.kodeco.com/u/hollance)\
**Post date:** [November 18, 2016, 11:43am UTC](https://forums.kodeco.com/t/constraints-not-working-in-either-of-last-two-xcode-versions/22807/2 "2016-11-18T11:43:33Z")

</div>

Can you zip up your project folder and upload it somewhere? Then I can take a look at what is wrong with these constraints. It’s a little hard to figure out what’s wrong from your description alone.

---

<div class="post-metadata">

**Author:** ![chappers](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/chappers/32/58485_2.png) [@chappers](https://forums.kodeco.com/u/chappers)\
**Post date:** [November 18, 2016, 1:40pm UTC](https://forums.kodeco.com/t/constraints-not-working-in-either-of-last-two-xcode-versions/22807/3 "2016-11-18T13:40:10Z")

</div>

Hi Mattijs, the project should be here for you to view. I also don’t seem to be able to preview multiple device layouts when i click on main storyboard preview. I completed the bullseye app but never got close to being able to make the constraints stick. Brilliant book btw

> **[Dropbox - File Deleted](https://www.dropbox.com/s/0bgk7k03nkqf047/constraint%20test.zip?dl=0)**
>
> Dropbox is a free service that lets you bring your photos, docs, and videos anywhere and share them easily. Never email yourself a file again!

---

<div class="post-metadata">

**Author:** ![chappers](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/chappers/32/58485_2.png) [@chappers](https://forums.kodeco.com/u/chappers)\
**Post date:** [November 18, 2016, 4:01pm UTC](https://forums.kodeco.com/t/constraints-not-working-in-either-of-last-two-xcode-versions/22807/4 "2016-11-18T16:01:36Z")

</div>

![](https://raywenderlich-com-v3-forums.s3.amazonaws.com/original/3X/3/3/33587da059ee6c630dc50b629cf268ea4e2604a1.png)

---

<div class="post-metadata">

**Author:** ![hollance](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/hollance/32/109009_2.png) [@hollance](https://forums.kodeco.com/u/hollance)\
**Post date:** [November 19, 2016, 2:27pm UTC](https://forums.kodeco.com/t/constraints-not-working-in-either-of-last-two-xcode-versions/22807/5 "2016-11-19T14:27:30Z")

</div>

I had a look at your project and it looks just fine. It also seems to work fine if you run the project. For some reason it just doesn’t display right inside Interface Builder. But I don’t think there is anything wrong with your project. 😃
