XCode 9.4.1 Freezes creating a Stackview with UITableView ans Label

Hi,

I'm new on XCode. After several years using my Macbook Pro just for fun, I decided to make it more useful, and I'm liking it.

So I decided create my own App, a simple one just to learn everything I can about Swift. I always like to hardcode, but I'd like to learn XCode and master storyboard creation direct on GUI because I think it is more productive, if it works perfectly.


THE PROBLEM:

I'm running XCode 9.4.1 (last version today). The App is simple and it has about 5 scenes. So, I created another one, put a UIImave Viewer, some buttons (embed in a stack), some Textfields (also embed in stack). At last, I created a Label and a TableView and after that I embed them on a Stackview (everything through GUI, Storyboard editor). But after I do anything with this new stackview, XCode freezes on a inticatorview (I think it was trying to save, I'm not sure). My Macbook is slow, but it has 16Gb of memory and lots of free disk space, so I waited, but it is simply frozen.


I have to kill XCode process and open again, but it freezes again. Cannot open it anymore. I keeps freezing. I tried to delete caches, and anything else I found on web foruns.

I tried to edit Main.storyboard by hand to remove the last stackview created, but it gives me an inconsistency error. The only way I could get back to work again was deleting the entire scene from XLM file and creating all again.


I'm still in the process of creating the new scene, but I'd like to restore the old one, id had a lot of configuration and constraints done, but what I want the most is that it does not happen again, or, if it happens, I know how to recover without having to delete the entire scene.


Thanks !

Replies

So, I created another one, put a UIImave Viewer, some buttons (embed in a stack), some Textfields (also embed in stack) … I created a Label and a TableView and after that I embed them on a Stackview


What are you trying to achieve by embedding different levels of stack views with table views inside ?


Is it just to test (you probably got the result) or for some specific intent ?

I'm newbie on visual programming and feel more confotable and think it is a lot of easier to work on constraints stacking some of the components than work with then freely.


I'm getting used to work with the constraints, and already rebuilt from scratch the lost Controller, but I am still worried that something like this can happen again.

Stacking components is very handy in some situations.


But my advice is to do it with moderation. I would avoid stacks of stacks (it makes further modification pretty hard) as well as stacking objects like tableviews.

To get bthings organized, I prefer simply creating a view to use as container in which I place objects and use layout constraints relative to enclosing view.

But that's a personal choice.