Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interface Builder: How to clean up the deleted constraint?

I used command-delete to remove some constraints on the Map View widget in IB. Instead of being completely removed, the constraints are actually just faded as shown in the attached picture.

enter image description here

I have tried both saving the file and reopening the project, but it seems like they will not be removed by XCode.

How can I get them removed?

EDIT

This is what I see in the Size Inspector window

enter image description here

I am using XCode 6 (6A313)

like image 572
Anthony Kong Avatar asked Sep 20 '14 08:09

Anthony Kong


People also ask

How do you clear constraints in XCode?

Open Utilities panel on XCode and select Size Inspector. Here list of all constraints are listed for selected view in storyboard. Now, select constraint(s) you want to delete. Now hit Backspace key on keyboard and selected constraints are deleted.

How do I change constraints in XCode?

Clicking the Edit button in any of the constraints brings up a popover where you can change the constraint's relationship, constant, priority, or multiplier. To make additional changes, double-click the constraint to select it and open it in the Attribute inspector.

What is constraint to margin?

By unchecking "constraints to margin", you are adding constraints, meaning your interface will react correctly to changes in size or orientation.


2 Answers

Select it in the left panel and hit backspace to delete for good.

enter image description here

like image 182
Adam Waite Avatar answered Nov 04 '22 07:11

Adam Waite


instead of using cmd and delete, select the view ,goto size inspector and delete the constraints there, here is the screen shot for your reference.

enter image description here

like image 23
Mounika Vangala Avatar answered Nov 04 '22 08:11

Mounika Vangala