I made a project on Xcode 7.3, but after the release of xcode 8 I had to move onto that as I upgraded my project from swift 2.2 to swift 2.3 too, but im having a very weird problem. When I open my XIB file, it makes xcode very very slow almost crawling, I got 3 ways to fix the problem,
1) Take a new View from toolbar and make the previous view the subview of new view and apply contraints and it will stop hanging.
2) View the xib as source code, insert random spaces at the end of lines (Let xcode know that you edited file whatever it is), save it and come back, it will occasionally fix the problem but didnt work everytime.
3) when XIB is hanging, change the device in View as and it will start working properly untill you go to another XIB and come back.
This is happening in Xcode 8.1, does anyone know what can be the issue ?
Related
I have updated by Xcode to Xcode 11 Beta and have updated the build settings from iOS 12.2 to iOS 13. Everything is working perfectly but the viewcontrollers in Storyboard appear black. The components of the viewcontrollers are present but it is difficult to preview due to the black screens
Had this same issue, eventually tracked it down by cut-pasting elements from the black screen to a brand new view controller and see which ones cause the new one to have the same error, or caused the old one to render.
After fixing it, the diff ended up being a background image on a specific UIButton.
I found that after updating to Xcode 11 if one element has an issue, it breaks the whole storyboard like your screenshot.
I had this issue last night. My UITableView was expanding too far out of the screen on the right hand side. I dragged it back into the bounds of the UIViewController parent and updated the right hand side constraint to be 0.
So check if anything goes beyond the UIViewController boundary that shouldn't.
In Xcode 12.4
After trying lots of thing, finally i resolved my issue
First close your project.
just goto finder -> Application -> Xcode -> get info -> uncheck open using Rosetta
Now, simply open your project.
Just delete any constrain in that viewcontroller and then undo the change.
Check the values for the cell heights. In opening an older project, the row height (in the TableView itself) was 0. Changing it to a positive value or deleting the value (so it defaults to automatic) fixed the issue for me.
I had the same issue, here are the steps I followed.
Clear constraints, for my case the source was from UITableView, and make sure constraints are attached to safearea not superview.
From the toolbar on the top, go to Editor > Canvas > Layout Rectangle. It is very important to repeat this step 3 times.
Once finished, quit XCode and reopen it again and everything should be fixed. I've noticed this happens when I'm switching views for different devices 8, 11, 4s.
I don't know exactly what the problem was, but I was able to solve it with the following steps.
Run 'pod install' to install all cocoapods dependencies
In Xcode: Product -> Clean Build Folder
Restart Xcode and run the project
I have updated by Xcode to Xcode 11 Beta and have updated the build settings from iOS 12.2 to iOS 13. Everything is working perfectly but the viewcontrollers in Storyboard appear black. The components of the viewcontrollers are present but it is difficult to preview due to the black screens
Had this same issue, eventually tracked it down by cut-pasting elements from the black screen to a brand new view controller and see which ones cause the new one to have the same error, or caused the old one to render.
After fixing it, the diff ended up being a background image on a specific UIButton.
I found that after updating to Xcode 11 if one element has an issue, it breaks the whole storyboard like your screenshot.
I had this issue last night. My UITableView was expanding too far out of the screen on the right hand side. I dragged it back into the bounds of the UIViewController parent and updated the right hand side constraint to be 0.
So check if anything goes beyond the UIViewController boundary that shouldn't.
In Xcode 12.4
After trying lots of thing, finally i resolved my issue
First close your project.
just goto finder -> Application -> Xcode -> get info -> uncheck open using Rosetta
Now, simply open your project.
Just delete any constrain in that viewcontroller and then undo the change.
Check the values for the cell heights. In opening an older project, the row height (in the TableView itself) was 0. Changing it to a positive value or deleting the value (so it defaults to automatic) fixed the issue for me.
I had the same issue, here are the steps I followed.
Clear constraints, for my case the source was from UITableView, and make sure constraints are attached to safearea not superview.
From the toolbar on the top, go to Editor > Canvas > Layout Rectangle. It is very important to repeat this step 3 times.
Once finished, quit XCode and reopen it again and everything should be fixed. I've noticed this happens when I'm switching views for different devices 8, 11, 4s.
I don't know exactly what the problem was, but I was able to solve it with the following steps.
Run 'pod install' to install all cocoapods dependencies
In Xcode: Product -> Clean Build Folder
Restart Xcode and run the project
I developed a project using xcode 7 and i updated my xcode to version 8.0 . According to the below steps it happens (I just wanted to show in which step this layout bug appears).
i opened my previous project and run in xcode 8 it works fine at first without opening the story board from xcode. (This is only a one view of my app).
And i open the story board by selecting iphone SE (new feature of xcode 8)
i ran the project after opening the storyboard, then this view looks fine too but the storyboard view was a mess
(but many other views looks messy in my iphone after opening the storyboard)
storyboard view looks like this
according the the stack overflow researches i perform "update frames" action in storyboard to this view. after that it looks good in storyboard
but it looks wired when run in iphone after perform "update frames"
is this a bug in xcode 8 or any solutions to this. this layout issue starts after opening the storyboard from xcode 8, without that it works fine in UI
you can check this link :https://forums.developer.apple.com/thread/63133 it should help you a little bit , or (I have done this option in my projects) you can change the frame( of ViewController) to freeroam (600, 600) , if your view looks totally different. The final option is to make you constrains again to fit the ViewController's size(the longest but I think that the best option).
Did you put your UI in a subview?
Cause I have the exactly same problem with you,
and I solved the problem by adding " self.layoutIfNeeded() " in the area which generate my subview.
Hope this help.
This issue is resolved by Apple in xcode 8.1 please download the new xcode and try it again running on simulator or device you may get this issue resolved i have done this and it resolve my issue at once while i am now using xcode 8.1.
I have a xcode project with buttons and other objects in it. But the objects are all greyed out in my view now. The project still compiles and shows the buttons fine. I saw posts about using auto-layout, changing size-classes, and modifying the IB. But whenever I make any of those changes, a lock icon shows on the screen and nothing changes. I can go back to an old version of my code, but I'd rather find out what will fix the issue.
What was I doing to break it? I was just exploring through the different xcode windows and views, and don't know exactly when the viewcontroller objects became affected.
When I attempt to drag a UIButton to my ViewController.m (control + drag), Xcode crashes. I have tried unchecking the "Use Autolayout" box, but I am still having the same issue. I am using OS X 10.9.4 and Xcode 5.1.1. Any ideas?
That sounds awful and it should not be happening. However, there is an easy solution: do not do that. Control-dragging from the Interface Builder canvas to your code is completely unnecessary; you can do everything you need to entirely by working in the code and in IB separately.
I realize that for you this is not a solution ("why am I crashing?") but rather a workaround, but it's a perfectly good workaround and will allow you to move on with your work.
I just had a similar problem Ctrl-Dragging from a map view inside a prototype cell to the view controller that the prototype cell subclassed from. I mistakenly had an old outlet reference left on the map view, and after removing and saving the change, Xcode no longer repeated the crash.
Do you have more than one version of XCode on your machine? I had the same issue and think there was a conflict because I had XCode 5 and 6 installed. I deleted 5 with appCleaner and got rid of all the extra files. Everything was working after that.
If you only have XCode 5, I would try a clean install.