7

I'm using Xcode 6.2 (Xcode 6.3 has same problem) at the moment. I've got some ridiculous situation when I just click to open storyboard files in the project navigator.

Xcode changes frame of elements in the storyboard file. I just open the file, I did nothing. See below screenshot. It's my diff screen. I shot this just after open a storyboard file.

enter image description here

Those changes are just tip of the iceberg. There are tons of unexpected changes.

I have no idea the reason why? and how can I fix it?

I'm scare opening storyboard files. I'm gonna die if this is persist.

Dae KIM
  • 793
  • 7
  • 17
  • did you update frames and save it after you assign constraints to the view? – Deepak Thakur Apr 23 '15 at 05:37
  • 1
    I have seen similar behaviour and it is annoying - I often discard changes before committing if I know I didn't change the storyboard file, *but* as long as your constraints are set correctly it should all be good at runtime – Paulw11 Apr 23 '15 at 05:37
  • @Katoch I can't remember exactly. Maybe yes Maybe no. The behaviour that you mentioned can be a reason? – Dae KIM Apr 23 '15 at 05:45
  • @Paulw11 But I have to change something the storyboard file and the problem is it's not good even runtime. One of UITableView is getting smaller. – Dae KIM Apr 23 '15 at 05:47
  • @DanielKIM Its not the exact solution to the problem you mentioned. That's why I commented instead of posting the answer. You will come across this problem for tableview / collectionview cells only.. I just update the frames to solve this issue.. It will work fine if you assign constraints to the views in cell accurately.. – Deepak Thakur Apr 23 '15 at 05:49
  • @DanielKIM Then your constraints aren't correct. – Paulw11 Apr 23 '15 at 05:50
  • @Katoch Alright, you meant if I update frames and AutoresizingMask (I'm not using Autolayout) properly it would be fine. I'll try it. But if you're right I don't understand why Xcode change the frame even if I'm wrong something. – Dae KIM Apr 23 '15 at 05:57
  • I really hate apple for making the autolayout an even worse nightmare. – Darklex Apr 24 '15 at 18:01
  • i have the same problem, and some views can't be update frame!!! – jeffrey Jun 13 '15 at 09:03
  • I guess this situation happen when copy scenes from another storyboard files. Once copy a scene then open again I could see that happen only copied scene. But it happens not always. – Dae KIM Jul 30 '15 at 23:34
  • I'm still struggling with this. Every time I open storyboard after it has been closed it will re-arrange many of my frames. I can leave it and it will be good at runtime, but if I want to change anything I have to spend 10 minutes putting everything back where it should be. WTF Apple? – David P Oct 02 '15 at 06:46
  • Issue exists also in Xcode 7.2 ;) – Amr Lotfy Mar 01 '16 at 08:42
  • It is a known issue, check [this](http://stackoverflow.com/q/5900245/1356559). – Amr Lotfy Mar 01 '16 at 08:46

0 Answers0