Xcode - Storyboard views size and position modified when opening

前端 未结 2 1287
醉梦人生
醉梦人生 2021-01-08 00:53

I noticed something very annoying with Xcode: I have some storyboards for which certain views size & position are systematically updated when I open them. This is annoyi

2条回答
  •  不要未来只要你来
    2021-01-08 01:19

    Xcode saves the storyboard layout information in an XML file (.storyboard). So any changes on the storyboard will be reflecected in that XML. Especially if you work with teammates this information might change regularly. You can try it out by moving around some items (don't change anything else) and after that start a diff with your git repository. You should see again a change in the XML. You could ignore the storyboard file in your git checkout. But this wouldn't make much sense as your teammates may have added new items to the storyboard.

    Maybe this helps as well: [Xcode changes unmodified storyboard and XIB files

    If I understand the first answer correct other changes might also trigger a change on the storyboard XML file.

    regards Thomas

提交回复
热议问题