I have some issues with auto layout, where the console says there are conflicting constraints. However, when Xcode attempts to fix the issue, everything works as intended. In the console it reports
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fe578db22f0 V:[UILabel:0x7fe578d9b200'Label'(32)]>
I want to find the constraint mentioned: "0x7fe578db22f0" and delete it manually.
Is there anyway to find it by using that hex code? And if not, can anyone suggest a way to fix my issue? I have a lot of constraints and it would be very difficult to go through and test each one.
If the question is merely how to identify which view that constraint is associated with, the easiest way is probably using the view debugger. So, run the app and click on the "debug view hierarchy" button. Then examine your view hierarchy in the left panel (narrowing it down by searching for view type, if you want), until you see a constraint that looks like the one in question. And by choosing the object inspector, you can confirm the address of the constraint in question.
Now that you've identified the precise constraint and view in question, the tracking down of its creation in the app should be much easier.
Add UIViewAlertForUnsatisfiableConstraints symbolic breakpoint help you debug autolayout easier !
Related
Everything I have found, every one says this cant be done.
I studied in fullsail university and they taught me how to do this so I know without a doubt it can be done. No one just knows how and assumes it can't.
Basically, when in XCode-story board, I would add constraints to a view and everything is all blue and perfect. From there, if you click, hold a drag, the view to another position then all of the constraints will turn orange. (Not RED because the constraints are still good it just simply needs to snap back into place..)
When in school my teacher taught me a quick key short cut that you press and everything snaps back into place and its all blue again. It has been a while since I have coded and i am just now getting back into it again and i just cant remember what that shortcut was.
I hope someone out there knows how to do this. Maybe any fullsail graduates?
Your responses are greatly appreciated.
I figured it out.
option + CMND + '='
What you're looking to do is referred to as "Update(ing) Frames."
The quick command is indeed option-command-equals
The command can also be reached from the bottom menu of a storyboard.
This link may change in the future but check out the Auto Layout Guide. Specifically reference the "Resolve Auto Layout Issues Tool" section.
When I go to the screen that is causing this error, their is a white screen. It should have a website on it. Ive read the error but I don't know how to fix it. Any help? The Picture shows what it says.
Update: The warnings have went away but I still get a white screen.
Look underneath the error and read what it says:
Constraint referencing items turned off in current configuration. Turn
off this constraint in the current configuration.
It seems as though you had some items in your storyboarrd window that had some constraints set on them, and then those items were deleted. The constraints seem to still be set.
If you remove those constraints, this error should disappear.
If you cannot find those constraints, refer to this question's answer:
Xcode Storyboard warning: Constraint referencing items turned off in current configuration. Turn off this constraint in the current configuration
im having a bit of a problem with the viewcontrol in Domino Designer 9.0.
Im working on an Application that was NOT created by me. I cant ask the original developer but i have made some good expierence here so i hope for help again.
I have a view control that is categorized. At least i think its categorized but you can expand and collapse some values so i guess its categorized. And i simply dont want that. I already went in the View(not the Control) and configurated every column to "none" sorting. However the control is still categorized. I have already been googling for ages but everybody is talking about a "expandLevel" property which is simply cannot find. I know i have given you very litle information on my problem but thats all i know. I hope someone can help me. Thanks in advance.
PS: Sorry for the bad english im not a native speaker.
Sincerly, Brugen.
I have no idea whats wrong with your application: As the helper- text in the column- properties of a view states on the Display Tab:
"Expand image" and "Collapse image" can only be defined when a column is categorized, or its responses are intented.
To categorize this column open the View design element to which this is bound, and choose to categorize any columns that you wish to categorize
I just checked with an example database to be absolutely sure: The view in xpage is categorized, when the underlying view is and it is sorted only when I change the column- property. No voodoo in xpage involved.
There might be some caching issues (serverside or clientside) that prevents you from seeing the changes, but basically it should work.
The expandLevel property that you found is basically just there to tell the xpage which categories to expand / collapse by default. If can be found in the All Properties- Pane of the xpage, opening data - data - dominoView.
If this does not work for you, then the guy who made this xpage did something special. Then we need the source- code of your xpage to tell WHAT he did.
Assume you've selected an object and you have the Size Selector in the Utilities panel open. You can see the list of constraints applied to the object. In the list of constraints you could click on the little gear and pick delete. You can't in Xcode 6.
There are still several ways to delete constraints in IB:
Find the constraint in the Document Outline and delete it that way (but it can be hard to find).
Click on the little bar in the storyboard and delete it that way (which can be hard to click on).
Double click on the constraint in the Size Selector which will open Attribute Inspector and highlight the constraint in the Document Outline. This can be a nuisance when you want to delete several.
Still, I miss ease of use of the gear delete feature and I'm wondering if it's still there in a similar fashion and I just can find it. While the other ways work, I find myself wasting lots of time especially when playing with the new Size Classes feature. So, find a easier way to delete them?
In Xcode6 (Beta5) when I click on a particular constraint in the Size inspector, it acquires a thin blue border. The constraint can then be deleted using the backspace.
The accepted answer is right, but there is so much frustration with selecting constraints that lay outside of selected view that I decided to add this tips as another answer.
I found incredible list of tips that helped me to solve this problem.
The problem:
You select the view and Xcode shows related constraints.
You try to choose the one that is outside of selected view.
You fail (end with selecting the view beneath the constraint)
Soulution:
Click it with Shift+Ctrl pressed and you'll see a menu of all the views that exist where you've clicked.
To delete selected constraint press delete key.
The selected answer is incomplete. When you delete the constraint from the Size Inspector, you are leaving behind the constraint object in the Document Outline pane. It is greyed out, meaning it is not used, but still exists and, what's worse, will affect auto layout with errors, warnings or conflicting constraints and you will go crazy until you also delete them from the Document Outline pane.
So:
1. Delete the constraint from the Size Inspector as in the accepted answer
2. Delete any greyed out constraints from the Document Outline
Live a happy, constraint-free life.
This answer from #wayne chi is the simplest, and spares you from hunting down constraints in Document Outline:
Double click the grayed out constraint (switches focus to the constraint) then press delete. This will delete the constraint.
Sometimes, the easiest way is to close the file in Xcode and edit it with a text editor. :-/
If you want to delete ALL constraints from a viewController simply turn off auto layout and then reenable it (or don't) and all of the constraints will be gone.
I'm relatively new to Cocoa and I would like to implement the ability to add or delete items from a pop-up menu in the same way that the OS X System Preferences/Network Location pop-up works. Selecting the 'Edit Locations...' option rolls down a window that provides the ability to add to, or delete from the existing Location list. My interest in doing things this way is as much about conforming to the relevant Human Interface Guidelines as having a way to dynamically change the menu content. (I have no real problem with the 'background' coding side of things, it's the user interface that's my primary issue at this stage.)
Is this a standard IB View?
On the surface, I can't see anything appropriate, but maybe that's just my inexperience. I'm assuming that, because this is not an uncommon sort of requirement, the task should be pretty straightforward and that Apple, or someone, would even have a relevant code sample to show how to define such a window.
Can anyone point me in the right direction?
Sorry for the late answer. I found this tutorial: http://cocoadevcentral.com/articles/000014.php