Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Frame for clip view will be different at runtime error in Xcode 5 and Objective-C

I'm now building on OS X app using Xcode 5.0 and Cocoa, and when I used a lot of objects ranging from text field, text view, radio buttons, to check box, etc... and ran the simulator, it looks like working successfully. However, there are two warnings which are tagged with yellow triangles that read Misplaced view - Frame for "clip view" will be different at runtime in MainMenu.xib file.

What does the error mean? And how can I resolve the warnings? And finally, should I bother to work a bit harder to try to remove those warnings when I get to sell the app? (or does Apple still allow developers to sell an app even when it has some warnings but nonetheless sounds working?)

For your information, I didn't write any code in any of my files yet - just dragged objects out to Interface Builder, and edited and aligned those objects a bit and just ran it, which this book does (but this book assumes to use Xcode 4).

Thanks.

like image 937
Blaszard Avatar asked Oct 10 '13 14:10

Blaszard


People also ask

Why does my Xcode Interface look different?

My Xcode Interface Is Different 1. Xcode Simulator Errors My iPhone simulator looks different? If your iPhone simulator doesn’t look like the one you see me using in my videos, it’s because your iOS simulator is at a different zoom level.

How to find the error message when your Xcode app crashes?

After the crash, go to Xcode in the lower right hand pane, scroll all the way to the top. So now that you know how to find the actual error message when your app crashes, the next step is to learn to recognize some of the more common types of messages because they will hint at what’s wrong.

Why is my code not working on Xcode?

If you run your app and you get some build errors, that means Xcode has detected that the syntax of your code is wrong. If Xcode is complaining that a specific identifier doesn’t exist, then check that all of your opening curly braces have corresponding closing curly braces.

What does “unresolved” mean in Xcode?

You will often see this error if Xcode cannot find the variable or property you are referring to. “Unresolved” means that Xcode couldn’t find something, and “identifier” is another word for a variable, property, function name, etc. Here are several reasons why you could receive this error:


2 Answers

Xcode5 defaults to using Auto-Layout. The warnings mean that some of your UI elements do not have enough constraints set, so when you manipulate the UI (for example resize the window) things may look different than you intended.

When you open MainMenu.xib in Interface Builder, a yellow arrow should appear in the component section. Click that arrow and a view appears that explains the offending elements. Each has another yellow element that brings up a context menu with suggested fixes.

like image 187
Gerd K Avatar answered Oct 01 '22 18:10

Gerd K


Optionally you can disable "Use Autolayout" of the nib.

like image 30
ThE uSeFuL Avatar answered Oct 01 '22 20:10

ThE uSeFuL