My StoryBoard is Messed Up Xcode9 - ios

My Storyboard is messed all of my views are messed it was working fine and suddenly this happened anyone please tell me how to solve this i do not have any backup i am in big trouble check this screenshot.
StoryBoard Image
Close Picture Of StoryBoard

Try this:
Open any swift file, clean project.
Close project and quit xcode (Right click xcode and quit)
Open back project, you should be in the swift file you previously opened.
Go to the storyboard file again.
One clue I know of which caused this issue is that, if you have a compiler error, u click on the error, and it brings you to storyboard file from that error message. I've experienced this since xcode 8.0 till 9.0. Not sure if this happens to me only.
So try to open storyboard file every time using Project Navigator at the left hand side.

Related

Xcode 8 storyboard error

Anyone can help me something goes wrong with me, I cant see my storyboard View, subview, imageview. All became white and its show error like on storyboard file
"An internal error occurred. Editing functionality may be limited."
I have open my project in xcode 8 and 8.1 beta latest xcode but both have same issue.
Main thing is that this is happening with all project not just one.
For example i am opening new project that is open in xcode 8 and i cant see that storeyboad file. Old project is working fine which are not open in xocde 8 i can see that project and open in xcode 7.3.1. but if i open that in xcode 8 and convert to xcode 8 compatible and this issue happen.
I have the same problem with Xcode.
I resolved it by disabling SIP (System Integrity Protection):
Press Command-R when start hold til logo and loading status appear
Open terminal
In terminal print: csrutil disable
Restart system
I have also faced this issue and resolve it by only follow these steps:-
Go to Xcode -> Preferences
Select Locations Tab
Click on Derived Data arrow.
Trash Derived Data Folder.
Restart System
Automatic Fixed this issue.
May this help you.
They inserted autolayout a few versions ago, exactly for this foreseeable reason. It's highly discouraged to use storyboards without autolayout, if you want to work with size classes, different devices with different screen resolutions, orientations, ecc.
My suggestion is revert the project to previous commit, reopen it with xcode7, add the needed constraint and reopen with xcode8 (you will still have problems, because of the many bugs of the new storyboard but they are mostly fixable).
Another option to keep working with in xcode8 it is to use a "freeform" simulated size from the Size inspector of the view controller and adapt the sizes to the old viewcontroller dimensions, but you will have to manage compatibility with all devices sizes programmatically, as i hope it is already being done. It doesn't anyway guarantee that everything works
There are some bugs in storyboard of xcode 8 so if you are not using autolayout then you should use xcode 7. now as you said in question that you are getting problem to open storyboard in older xcode (i.e. 7.x) that because once you open project in xcode 8 then it's change some configuration of storyboard which are not compatible with older xcodes.
So now for solution Open your project in xcode 8 -> open storyboard -> File inspector -> Under Interface builder document -> select xcode 7.x instead of latest xcode 8 from Open in
It will show popup something like Saving for Xcode 7.x will close your document and data for Xcode 8.0 features will be removed. Click Save and close the xcode 8 and open project in your older xcode (7.x) and you will able to open storyboard as it was before!!!
You can refer below screenshot,
Hopefully Apple will fix issue related storyboard and in newer version of xcode 8 you will able to switch project without messing up your UI! But right now there should be a workaround as i mentioned above! Try it!!
for me I just make all the views in storyboard size to inferred
^^"

Xcode 6 localization error

I accidentally deleted localization files , which resulted in the removal of Storyboard. I restore Storyboard from the Recycle Bin and add it back to the project. Then in Storyboard File Inspector i pressed the "Localize" button...
Next i go to my project info and add to them localization files (interface Builder Storyboard)... Then I made changes to the view in localiztion storyboard. Run the project in the emulator. In the emulator everything works fine. Text in View changes depending on the selected language... All greate. But when I try to run the project on the iphone localization does not occur. I also noticed that even if i change Main.Storyboard (Base) any changes in the View on Iphone did not change. Even if I delete any picture also view did not change. But in emulator all works great. I tried to remove the application from the iPhone, but it has no effect. I also installed the app on another iPhone, and it also does not give effect. Any idea how to solve this problem?
Rename storyboard file.
Reconnect storyboard in project.
Done.

Ridiculous situation : Xcode changes elements frame if I just open storyboard files. I did nothing

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.
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.

Xcode 6.3 storyboard stuck

When I open storyboard, the XCode shows that it's building right now, I suppose because of IBDesignable I use.
So it never got success, XCode stuck:
I tried to open just storyboard file with opening entire project, so seems it works, but when I try to close it, it's starting stucking again, I can't close it, and it every time in my process.
I tried restarting my mac, deleting xcuserdata, but nothing help to me.
It's upset because I written entire project using storyboards and now I can't continue to work on the project =(
One more when I try to open another file and I am in storyboard right now, like selecting a class or project file it also stuck. (switching from storyboard)

Xcode 6.3 Crashes when navigating from storyboard to other Swift 1.2 file

I installed Xcode 6.3 which includes support for Swift 1.2. It turned up a ton of error messages, which are mostly casting issues.
I navigated to the storyboard, and cannot go back to any other .swift without the whole thing crashing. I have force quit, restarted, and even re-installed, and I still can't navigate away from the Main.storyboard file.
I have tried the suggestion described here to open storyboard as code, make some changes, revert those changes, save and try again, and still no luck.
Is something in my code breaking Xcode? Is anyone else experiencing this? I had used Xcode 6.3 beta successfully with the same codebase.
Update:
This has now been fixed in Xcode 6.3.1 released on the 21st of April 2015.
I gather from the apple developer forums that this is an #IBDesignable issue. Especially in projects that use custom fonts, additional xibs, etc.
I have somehow fixed my issue by removing all #IBDesignable from swift UIView class definitions. You can open your project directory with TextMate or other, search and remove all "#IBDesignable"
However I still think this is a MAJOR bug, that needs to be worked on.. so keep filing bug reports to Apple.
A temporary solution:
By opening a "New Window" (same project).
One for the code, one for the storyboard or reduce first, work freely with second window.
You can keep your #IBDesignables
EDIT : Bug fixed -> Update Xcode 6.3.1
Launching Xcode while holding shift fixed it for me.
(This suppresses Xcode's state restoration.)
Update: Xcode 6.3.1, released today, resolves this issue.
Update
Xcode 6.3.1
For me, everything works !
Temporary solution:
If you have currently opened Assistant Editor switch to another file using alt+click. You can keep your #IBDesignables.
Here's how I get around this strange bug:
Before launching Xcode, rename the storyboard file in finder so that Xcode won't find it (e.g. add the extension .temp)
Launch Xcode - works fine even if it hanged before since it cannot display the storyboard editor
Open a new window in Xcode
Rename the storyboard file to its original name
In the new window in Xcode - select the storyboard - Xcode does not hang
Minimize the new window and work as usual in the original window. Now you can select any file - even the storyboard - without Xcode hanging
One problem remains, though, at least for me. Every time I select a file or edit something, Xcode needs to recompile the storyboard. Haven't solved that one yet.
I can confirm this bug. I was stuck in storyboard and could do nothing to get out of it (couldn't even open the assistant). As a workaround, with the storyboard open, right-click the .storyboard file and select Open As - Source Code. This will switch your storyboard to code and you will be able to then switch to any file.
It is not a bug anymore since Apple fixed it in Xcode 6.3.1.

Resources