I have a problem with the new Xcode (today I upgraded). When I push on my file view.xib, I see the XML code, and not the graphics interface. Why? How can I see the "interface builder?
Interesting that this is the second time someone has had this problem. You can open the File Inspector on the Utilities bar on the right ( Opt+Cmd+1 ). Change the File Type under Identity and Type to the topmost choice. It should be Default - com.apple.InterfaceBuilder3.CocoaTouch.XIB.
Right Click on the .xib file and select "Open As". Then select "Xcode.IDEKit.TouchCodeIntegration.EditorDocument.CocoaTouch-title"
Perhaps you should look at this Article, it will explain a lot for you:
Xcode 4 Transition Guide: Designing User Interfaces in Xcode 4:
Related
Sometimes in Xcode 6 Assistant Editor -> Preview stops working.
Showing just "No selection" even if no errors and Storyboard is ok.
Why does this happen?
The reason is "?" (questionmark) in Project's name (maybe there is a bug with other symbols – didn't check it).
You can try to rename Project or just create new one with name without "?" in it.
You must to Kill Xcode from processes for complete and then open it again. You can do it with Activity Monitor o CLI. Voila! - Preview is working again.
Don't just close Xcode keeping the app working. Sometimes also works closing with CMD + Q.
I had similar problem, but fixed it
You must open the xib or storyboard file in both assistant editors. Click the navigation button in the second editor (either the bottom or the right editor, depending on how you stack the assistant editors) and choose Preview to get the preview to appear.
thanks to
http://meandmark.com/blog/2014/09/xcode-6-no-simulate-document-in-interface-builder/comment-page-1/#comment-2883
I have played with Xcode 6 for a while and I encountered similar problems occasionally. I never used special characters in project or class names but the problem sometimes happens.
Now I have to test all ViewControllers at starting point to see if the Assistant Editor work. If not, I will just delete the class file and recreate the same one, it usually fix the problem.
Hope this can be fixed soon.
I'm trying to localize my app.
I noticed that if I add a language every localized file become doubled.
In this way it's impossible to maintain code or storyboard so I learnt that I need Base internationalization.
The problem is that when I select that checkbox in xcode project setting it shows a window without nothing to select, does anyone know how to fix this?
Here's a screenshot
First, you need to go to your storyboard file, open the bar on the right side, and go to Show the File Inspector, the furthest tab to the left. Then, scroll down and click localize. After this, when you check Use Base Localization, you should see the storyboard appear.
This could happen if Base Internationalization was active before then disabled and files deleted manually.
Create Base.lproj folder in your project folder using the finder.
Move your main story board to it also using the finder.
fix the reference to it from Xcode.
remove app. from device, clean & build your project.
All will be back to normal.
I am using XCode 4.3 and I am creating a tab bar application following an example in my book (likely used for XCode version < 4.3) but when I add a new tab and turn on check-mark to generate XIB file while adding a new file of Cocoa Touch, the GUI doesn't appear but display instead its generated XML file content. Do you know how to fix this ?
I find each time there is a new version of XCode, the Gui and defined functions seem to change a lot, doesn't this annoy for low programmers like me ? (By low, I mean newbies and those who can't keep up with such rapid changes). Thank you.
You can view my shot here
http://imageshack.us/photo/my-images/685/appleimg.png/
Right-click on the .xib file and choose Open as...
There will be a list of options. Currently you are using "Source Code", which displays as XML. Use Interface Builder - iOS instead.
This will be remembered between sessions. I don't know how it got set to this in the first place.
Alternatively, you may be in the Version editor instead of the Standard editor - this will show xibs as XML in order to correctly display changes.
I used to be able to do this in XCode, and now suddenly I can't in a new project I've opened that was sent over by a friend.
Is there a particular setting I have to change to start this again?
I.e. there is a textbox I want to link via Code, and now I just can't. :(
Need help guys!
You most likely have an assistant editor window opened to a wrong class, you will need to check on your currently selected view controller and make sure that its the same that is opened in the assistant editor
Or in assistant editor, select automatic (check screenshot)
The solution for me was simply to press Ctrl while dragging...
I was having the same issue and looked all over and couldn't find a good fix to the problem. What was happening when my Controllers were first generated they had the generic names FirstController. When I switched the names I didn't switch the value in the Custom Class area. To fix:
Select View.xib
Select File's Owner under placeholders. This should be on the left side of the screen with a yellow cube next to it.
Select the third option on the utilities menu (Identity)
Change the Custom Class class to the correct Controller name.
I know this wasn't the specific question's issue but I clicked on this question a few times so thought if someone had the same issue it might be helpful.
With the latest version of Xcode when I open up the Storyboard and .h file, I remove the last space below the #end tag on the bottom of the (fresh) .h file. Which for some reason wouldn't let me place the outlet after doing so, thanks Apple!
So to fix my problem i have to have that extra space below the #end tag in the .h file.
This is what fixed my problem and I know it doesn't answer this specific question but hopefully, it helps someone.
I had the same problem, In my case there was a mismatch between my class name at the identity inspector and that one at source code.
Had this issue too.
XCode 9: make sure in the Storyboard -> Identity Inspector -> "Inherit from Module from Target" is checked (or fill out the module name manually)
EDIT: Turns out checking that box doesn't help -- if you delete the class of the UIViewController, then type it in manually and hit Enter, in XCode 9 if there's a problem the checkbox "Inherit Module from Target" will not auto check itself. After trial and error it turned out in the class (Swift 4), there was a #if IDENTIFIER .... #endif which was perfectly valid, but screwed up Storyboard connections some how. After removing it, typing the class name in the storyboard auto-checked the box, and now connections work. Yay another XCode 9 bug.
In some web articles in the past I see an option in Xcode to add a new file using a "UITableViewCell subclass" template. For example here.
I can't see this in Xcode myself (I have the latest version, v4 of xcode).
Anyone know anything about this?
Choose Objective-C class
Press Next
Select UITableViewCell from the dropdown menu
It is a bit weird but it is.
You want to add an Objective C class (Under Cocoa Touch), then you'll be presented with a "Subclass of..." dialog. Select UITableViewCell.