I have a NSToolBar with few toolbar items in it. I added this toolbar and items in xib file. In a specific situation I want to add another new toolbar item and remove it again when I complete the task related to it.
I am able to do this, but with removing of the tool bar item, I am getting constraints related warnings. I dont want this warnings. CAn you please help me where I am going wrong?
Here is my code to remove toolbar item from toolbar:
-(void)removeFullVersionButton
{
[self.toolbarItems removeObjectAtIndex:[self.toolbarItems indexOfObject:TOOLBAR_ITEM_IDENTIFIER] -1];
[self.toolbarItems removeObject:TOOLBAR_ITEM_IDENTIFIER];
[self.toolbarItemDictionary removeObjectForKey:TOOLBAR_ITEM_IDENTIFIER];
[self.toolbar removeItemAtIndex:self.toolbar.items.count-2];
[self.toolbar removeItemAtIndex:self.toolbar.items.count-3];
}
I am getting this warning:
2014-01-17 17:22:58.804 UK Car Driving Theory Test Lite[14193:303] Unable to simultaneously satisfy constraints: ( "", "", "" )
Will attempt to recover by breaking constraint
Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens. And/or, break on objc_exception_throw to catch this in the debugger. 2014-01-17 17:22:58.805 UK Car Driving Theory Test Lite[14193:303] Unable to simultaneously satisfy constraints: ( "", "", "" )
Will attempt to recover by breaking constraint
Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens. And/or, break on objc_exception_throw to catch this in the debugger. 2014-01-17 17:22:58.806 UK Car Driving Theory Test Lite[14193:303] Unable to simultaneously satisfy constraints: ( "", "", "" )
Will attempt to recover by breaking constraint
Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens. And/or, break on objc_exception_throw to catch this in the debugger. 2014-01-17 17:22:58.806 UK Car Driving Theory Test Lite[14193:303] Unable to simultaneously satisfy constraints: ( "", "", "" )
Will attempt to recover by breaking constraint
Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens. And/or, break on objc_exception_throw to catch this in the debugger. 2014-01-17 17:22:58.807 UK Car Driving Theory Test Lite[14193:303] Unable to simultaneously satisfy constraints: ( "", "", "" )
Will attempt to recover by breaking constraint
Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens. And/or, break on objc_exception_throw to catch this in the debugger.
Please help..Thanks in advance.