0

I have a static table (UITableViewController) with few cells , its a data entry form basically, when i created this and put all the constraints all was good until i reloaded the project , now all the components are outside of view and entire layout is messed up along with constraints. This has happened twice and i have no idea why this is happening enter image description here

I deleted entire project and pulled it from repository , but still its same important thing is this runs fine inside app, shows the correct screen , so looks like this is some Xcode rendering specific issue,also this it not happening with some other screens in project, I have tried deleting tableviewcontroller and adding it thrice but same result. This TableViewController is linked to a UIViewController which has collectionview upon taping one of the collectionview cell this view gets laucnhed and hence linked though a show segue.

****** edit *********** Figured it out , this happens especially when i add height and width constraints to the label and textfield

vishal dharankar
  • 7,536
  • 7
  • 57
  • 93
  • Try updating frames on the Storyboard. – saagarjha Jun 04 '16 at 20:34
  • @ILikeTau that works , but next time i reload project again i have to update frames ,else again it gets scrambled , question is why is this happening – vishal dharankar Jun 05 '16 at 04:06
  • It looks like you're pulling it without some configuration file. Check to see if your repository has *all* the files you need. – saagarjha Jun 05 '16 at 04:31
  • @ILikeTau no i don't think , as all other layouts are working fine, also as said i tried deleting entire UITableViewController and adding new but same thing happens – vishal dharankar Jun 05 '16 at 04:32
  • What do you mean by "reload"? Is this happening every time you open Xcode? If so, then [this](http://stackoverflow.com/questions/32279306/i-have-to-update-frame-of-everything-in-storyboard-every-time-i-start-xcode) answer might help. – saagarjha Jun 05 '16 at 04:38
  • @ILikeTau yes each time i reopen project in Xcode – vishal dharankar Jun 05 '16 at 04:47
  • @ILikeTau yes i am using two different displays , retina and non retina , but reopening project on retina fixing it saving and reopening brings back all the errors. – vishal dharankar Jun 05 '16 at 04:56
  • @ILikeTau also this is happening with only UiTableViewController , i tried UIViewController and added few labels worked fine and didn't mess up even after reload – vishal dharankar Jun 05 '16 at 05:25
  • and also there are other UiTableViewControllers whose designed isn't getting messed up – vishal dharankar Jun 05 '16 at 05:26

1 Answers1

0

ok here is how i solved the issue , I found out that if i add height constraints on controls inside a TableViewCell then it would mess up the design, thus not adding height constraints and instead managing with top and bottom spacing helped. Still not sure why this is happening to only certain TableViewController and not all.

vishal dharankar
  • 7,536
  • 7
  • 57
  • 93