I have a lot of navigation bar back buttons in my project with a single space as its text (" "), in order to prevent iOS from showing "Back". However, sometimes XCode will replace the back button text with a Storyboard ID plus ".text" for no apparent reason.
Navigation Bar Back Button Image
Storyboard file
I have noticed that this problem often disappears when I rebuild the app, but this time it appeared after I archived my project, thus causing me some trouble...
Is this a bug with XCode's Interface Builder? Is there a way to fix that? I also have a localized version of the Storyboard, is that what is causing this problem?
XCode 7.2 (7C68)
iOS 9.2.1
EDIT
I have just changed the language of my iPhone and this bug disappeared, it is definitely related to the way XCode handles the localized version of the Storyboard.
Related
I was excited to check out Xcode 11 with my existing xCode project, so I started coding with the latest beta version. Today I wanted to upload my new app update but of course Apple rejected the binaries advising me, to use a GM version of Xcode 11 (not released yet) or the latest Xcode 10 app.
I was able to revert all changes made by Xcode 11 (provisioning profile, etc.) and opened the project back in Xcode 10 but I stuck in an error saying
This version does not support collection view cell content view. Open
this document with at least Xcode 11.0.
I am not able to build, archive or even open the storyboard in xCode 10. I found a single collection view in my storyboard in Xcode 11 which I created using the beta. But also after deleting the entire UICollectionViewController incl. the cells and cleaning the project, I am not able open the storyboard back in Xcode 10.
I've read accepted answer, but it wasn't obvious where to find "property" which could be just switched off or something like.
To make it more clear: you just need to replace all occurencies of collectionViewCellContentView with view in storyboard source code. For example see screenshot:
Next, rebuild and Xcode will remove <capability name="collection view cell content view" minToolsVersion="11.0"/> requirement; or remove it manually if you're using Xcode 10.
Hope will be helpful.
EDIT
Found how to "switch off" using of collection view cell content view, but you'll still need Xcode 11 to open storyboard. Change size to Default in collection view cell prototype size inspector:
Try to open the storyboard file with a text editor and search for the property. Usually when there is a warning, Xcode will show this warning during compile time. See if double-clicking the warning redirects you to the line of code where the problem occurs.
Just go to your storyboard which is not opening. Right click on it , Open it with Source Code and search for the property which is not allowing xcode to open your Storyboard.
Search for the property e.g "collection view content view".
Delete that property block. Now Open your Story board as an Interface Builder.
Note: By Deleting the property you will lost that in your view controller screen. :)
I have an old project that I've been working on and off on for about 4 years now - the project has gone through many upgrades of XCode versions from 6 to 10 (I'm now using XCode 10.2.1 with 12.2 SDK). The main problem I'm having with it is that it utilizes a Tab View Controller to switch tabs, and no matter what I do, I cannot get the tab bar to appear on the bottom of an iPhone X family device correctly: it appears much higher than it should.
To try and finally narrow down the problem, I've essentially temporarily "replaced" all code and storyboard items from the project to see if anything will move the tab bar to where it's supposed to (if I just create a blank new project with a tab bar controller, the tab bar does appear where it should). I created a test storyboard with just a Tab Bar Controller going to one navigation controller (no constraints have been put in). There is no viewController codes attached to them. I've replaced the app delegate with a "blank" app delegate so there are essentially no extraneous code or restraints there at all. And I still get the tab bar moved:
This happens on the simulator and the device, and there is no code or storyboard setting that's doing this (this same setup on a new project puts the tab bar in the right place).
I've looked around in the Build Settings and other properties that I may have missed to see if I constrained something years ago that may affect this, and didn't see anything.
Is there anything I should be looking for in the project settings that would do this?
I don't want to rebuild the project in a new project - there are many linked libraries, certificates, cocoapods, storyboard items, and I know it would be horrible to try and put it all back in one piece.
My Deployment Target is set to iOS 11, Devices: iPhone, Base SDK: iOS
Any help would be greatly appreciated!
This is usually caused by not having a correct launch image for the iPhone X. The easiest way to fix this is to tell the app target not to use launch images (from the app bundle or from the asset catalog) but to use the LaunchScreen.storyboard instead. (If you don't have one, make one; be sure to set it as a launch screen storyboard by clicking Use As Launch Screen and configure your target to point to it. Examine a plain vanilla new project to see what I mean.) You might not want to keep things that way in the long term but at least it will allow your app to launch to the correct size on all devices.
I have a serious problem on XCode. I can not see my storyboards correctly even they are full of elements. Sometimes elements are visible after I restart the XCode but later it happens again. Another issue is that even I change fonts or change locations of elements its not visible on storyboard until I restart the XCode.
XCode version is: 8.2.1 (8C1002)
You can see in the image that storyboard is transparent.
This question already has answers here:
Warning frame for "Navigation bar" will be different at run time appears in Xcode 8 Swift 3
(14 answers)
Closed 6 years ago.
I am getting constraint warnings for my Navigation Bar's for each of my Navigation Controllers in each of my storyboards in Xcode 8.
To get rid of the warning I set the Navigation Controller's Simulated Metrics->Top Bar setting from Inferred to None and then back again, and the warning goes away. Until the next time the storyboard is opened, then the warnings come back.
My storyboard has the iPhone SE display setting, and the navigation bar's are not Translucent.
Changing the device preview from iPhone SE also removes the warning.
Xcode 8 has some serious bugs in Interface Builder: as well as this one, it has a nasty habit of random-seeming frame changes to all sorts of views - in my Main.storyboard, it decided to make some keyboard input accessory views 1,000 by 1,000 points, and everything inside it had a frame of {0,0} - {1000,1000}.
Did the same thing to various UITableViewCells, but not all of them.
Changing everything back took ages, cleaned the build folder and recompiled, but the problem came back straight away as soon as the storyboard was opened.
I had to uninstall 8 and go back to 7.3.1,
I filed a radar, saw other people with the same problem on the dev forums.
I encountered with the same problem. I am not sure that is solution or not but I just changed the Simulated Metrics size which is page size from freeform to the Page Sheet and warning dissappeard
Regarding the issues of Xcode automatically moving some views/subviews to {0, 0, 1000, 1000} frame bug, which is related to main question:
I had the same problem. Make sure to use Xcode 8.1 now as this problem is fixed in that version.
Xcode 8.1 Release notes
https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html
Radars related : 28221021, 28244619
Update - Pointing the explicit frame bug solved on Xcode 8.1
Last night I updated XCode and the iOS SDK.
It looks like it messed up the UINavbar on the storyboard, here is a pic:
It shows two titles overlapping, if I delete the title , then there is still another one in the background, Im not able to remove that second one.
The strange part is it magically disapear, if I run the app.
XCODE version --> Version 5.1 (5B130a)
iOS SDK---------> Version 7.1
Yes, there's a new property for the uiviewcontrollers named "exteded edges" you must uncheck this in the interface builder inside the uiviewcontroller preferences. Or by inserting this code in your view did load. This will tell the controller not to draw the view under the navigation bar.
if ([self respondsToSelector:#selector(edgesForExtendedLayout)]){
self.edgesForExtendedLayout = UIRectEdgeNone;
}
I checked again and there was an extra navigation bar, its weird that It shows only after I upgraded, I think something happen with that view because I embedded it into a navigation controller.