Unable to simultaneously satisfy constraints after transform project from objective-c to swift - xcode

How can it be possible, that an app, that runs in objective-c without problems, get the "Unable to simultaneously satisfy constraints"-error after moving it to swift?
I´ve only copied the views of an app to a swift-project and now get this error. But when the constraints are valid in objective-c, how is it possible, that they are invalid in swift???
This is the view, I want to display:
When all fields are filled as in the screenshot, now error appears.
The error only is thrown when one or more fields are empty!
This are the contraints of this view
The constraints are the same as in the objective-c-Version...
What might i show u more, Mr Beardsley?
I uploaded the swift-Project to here
u can find the objective-c-version (very large!) here
to get the error, u must go this way:

Mr. Rob Mayoff was right: my Swift project has different constraints than my Objective-C project. :-(

Related

Android Navigation Architecture: How to access Nested native component for Deep link

I'm implementing Android navigation component and has using a nested graph. Component D is the guy who will handle this. But when I'm performing it throwing exception:
Fragment is unknown to this NavController
At one level it is pretty much clear that, Fragment-D redirected from Fragment-C, but what is possible solution in this case to get direct control on Fragment-D.
I checked same for Fragment-C and it is able to accessible but on back it throwing same error as stated.
Any suggestion!!
Fragment is unknown to this NavController is not directly related to deep linking. It is a common error message when you want navigate to a destination which ist not part of the current navigation graph.
So in your case it seems like your app has at least 2 navigation graphs (i.e. 2 NavHostFragments) and you want to navigate from NavHostFragment A to a destination in NavHostFragment B.
Of course, the current NavController A does not know about fragment B. That is what the error message is telling you.

AutoLayout debugger shows (null) ((null), (null)) for constraints with no useful information

I am working with AutoLayout and am using a library called FLKAutoLayout. When I have a conflict the autolayout debug messages that I am used to do not always show useful information about the constraints in conflict.
Has anyone seen this before and know how to resolve these messages?
From taking a look at FLKAutoLayout it looks like your problem is with this line in NSLayoutConstraint+FLKAutoLayoutDebug.m :
`return [description stringByAppendingFormat:#" %# (%#, %#)", asciiArtDescription, [self.firstItem flk_nameTag], [self.secondItem flk_nameTag]];`
asciiArtDescription is a private method on NSLayoutConstraint, while flk_nameTag is an property added as an "associated object".
Are you working in Swift? It could be something interfering with the program's ability to do those two things, even though it's in objective-C code. You could try creating a test project in Objective C that recreates the warnings to see if they appear.

Find a constraint using the hex code

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 !

Swift - Get CCNode from scene

I've tried to search on the internet for a method that can get a specific node from the scene. I've seen a lot of methods, but it doesn't give me a clear answer.
I've have build a scene in SpriteBuilder from Cocos2D. This is how the MainScene.ccb looks like:
If needed: This is how Player.ccb looks like:
I'm trying to get the player 'object' in Xcode after I published the project. I've tried to use CCBReader, but I can't find any useful method (unless I missed it). Also I've tried so use self.children, but I don't know how to continue any further with that.
Can you help me out? At the end, I want to get the position of the player.
Thanks!
By the way, I'm a beginner in Swift, so don't expect that I know all of the terms.
When you add nodes (sprite) to your sprite builder project, make sure it is selected, then on the right, click theorem code connections tab. In the 'Doc root var' type your variable name in the box.
When you load Xcode select the file that loads the scene from sprite builder and you can then declare a variable in this file with the same name you gave it in sprite builder. You will then be able to use that node (sprite) whenever you want and access it's properties.

Taming Xcode Storyboards

I've inherited a project that uses ~100 Xcode storyboard scenes. Trying to add to this project has been a nightmare for the following reasons:
My machine (late 2011 Macbook Pro 13inch with non-SSD drive 16GB running 10.8 + XCode 4.4) crawls to a halt on storyboards. In some cases I'll move a scene and it will take 10 seconds to update its position.
When I modify a scene (create a segue between two scenes, etc) in some cases all the scenes disappear. I have to do a "select all" on the sidebar to get them back.
Navigating a specific storyboard scene is absolutely frustrating. There's no apparent way to sort the storyboard scenes by name.
The filter feature below the scenes sidebar kind of lets me find the scene I'm looking for, but has the frustrating side effect of filtering out the attributes (segues, views, etc) of the specific scene I'm looking for. So if I need to modify the "add_new_guy" segue for "Person View Controller", and I type "Person" in the filter, I get the Person View Controller sans the add_new_guy segue. If I delete the text in the filter to make the segue appear, I'm taken back to the top of the scene list and (most likely) away from the Person View Controller at the other end of it. I end up scrolling all the way down the scene list manually looking for the specific scene I want to change.
I've spent hours googling solutions and nothing useful has appeared. Any suggestions on how to improve the storyboards situation or pointers to things in XCode I've stupidly overlooked?
Disclaimers:
a) I am well aware that moving to nibs would solve the problem and 100 storyboard scenes is nuts, but I've inherited the code and I'm expected to do storyboards for at least the next year.
b) I'm aware that it's possible to split out the project into several storyboards. I might look into this if I have time.
c) I've heard that some problems may be caused by having two storyboards open at once, which I've tried to avoid as much as possible.
d) Filing a bug with Apple's regarding storyboards is already on my to-do list.
First, work on splitting your storyboard up into smaller storyboards. I would recommend a maximum of 4-5 view controllers per storyboard. It will be a giant headache at first, just work on it over time. Take a look at RBStoryboardLink, which allows you to connect them "by allowing 'pseudo-segues' between UIStoryboards. These segues can be built without leaving Interface Builder and without writing any extra code". This will give you:
The ability to make abstract super classes in storyboards for very similar view controllers
Smaller, more manageable files that don't bring your computer to a halt
Fewer merge conflicts when working as part of a team (assuming your project is under version control)
Second, tell your boss to immediately purchase you a new, way better development computer. They'll make back the $3-$4k in more efficient development time in a matter of days. (Or, if this is contract work… buy a new one yourself.)
And, please indulge my slightly off-topic comment.
Regarding this statement:
I'm expected to do storyboards for at least the next year
Work expectations are always negotiable. Your boss likely thinks "switching from storyboards to code will cost more time than it will save." If this isn't true, say so.

Resources