UI Elements showing blue border in Interface builder - xcode

Since the latest Xcode updates all the elements of a view appear with a blue border in Interface Builder.
Is there any way to disable this blue border in each view?
When there are many elements in the view this is annoying.
Attached is a sample image

Go in Menu' Editor->Canvas and make sure the option "Show bounds Rectangles" or "Show Layout Rectangles" is disable.

In Xcode:
Editor
canvas
show Bounds rectangles.
This option show/hide the blue lines.

Related

NSOutlineView - Disclosure Triangle Interferes with Highlight Rectangle

I have an NSOutlineView with the highlight mode set to source list and the menu property set to a non-empty menu (I figured this last consdition is necessary to have the outline drawn).
When I right-click on a row representing an item that has children (i.e., is expandable), The blue outline around the cell has a slightly different color right above and below the disclosure triangle:
(This happens for every node, at every level of the hierarchy)
Additional information: My outline view is view based, does not use bindings (view controller is the delegate and data source).
Me cells are custom, designed on the storyboard, nothing fancy (icon image view and text field).
What can be causing this?
EDIT: The issue only appears with the round-cornerered highlight rectangle of the "Source List" highlight mode. With the straight-cornered rectangle of the "Regular" highlight mode, the stroke color is even all along.
When using the Source List style, your outline view has an NSVisualEffect view behind it, which causes the list to be composited differently. What you're seeing seems to be a bug with the vibrancy appearance. You could perhaps try to work around it by reducing the frame of the outline cell by overriding frameOfOutlineCell.

NSTableView with menu, how to change the border color with right click?

NSTableView with attached NSMenu.
Upon right clicking on the table view, the menu will appear. With it, the table view will highlight the row with a colored border.
Using the HoverTableDemo from the Mac Developer Library as a reference point.
The default color corresponds to the user preference from System Preference -> General -> Highlight color.
Q: How can this border color be changed/removed?
Add this to your TableView
- (void)drawContextMenuHighlightForRow:(NSInteger)row;
{
}

XCode Interface Builder Background color

I'm a newby in XCode/iOS development, and I want to change bakckground color of my label (XCode 5.0):
Opened my storyboard
Chose my label on the left side
Opened attributes inspector on the right side
But this tab has got settings of font, alignment, but no background color options! There is "View" section at the bottom, but it is empty. Please, tell me where can I find settings of background color? Thanks
At the top select the attributes inspector. Under the section "View" there should be a spot that says "Background". click that and choose your colour.
(refer to image for help)
Select the Label click on "Attribute Inspector" and scroll down you will see background option under View Section.
Select label before you go to Attribute Inspector
mylabel.backgroundColor = [UIColor redColor] ; is the code to change the background color. You get the color name before "Color" from the names of colors in the Apple color palette.

How do I hide the auto layout guides in Xcode?

I find the new auto layout feature in Xcode quite useful. However Xcode always displays the auto layout constraints as blue guide lines. This is sometimes annoying because these guides are displayed at the centers and edges of the views right where also the resize handles are.
So sometimes I can't resize a view by dragging the handles because I just can't grab them. A click will always select the blue constraint guide line. (And I have to resize using the size inspector).
Is there a way to (temporarily) hide these constraint guides?
In the main menu go to:
Editor > Canvas > Show constraints (toggle this to unchecked)
From this menu you can also show/hide layout and bounds rectangles, selection hgihlights and resize knobs.
This is fixed in Xcode 4.5.2
To completely turn the new layout system off, just uncheck "Use Auto Layout" in the File Inspector:

Making an NSButton resize its image (Cocoa OSX)

I could not find a way in the documentation to tell an NSButton to resize its image to fill up the whole button. Is there a way to do this programatically?
The closest you'll get is -setImageScaling: ... look up the constants to see how the image will be scaled within the button cell, given its bordered state and bezel type.
If you're looking to replace the standard button entirely with your image (ie, the button cell doesn't draw itself at all - your image serves as the entire visual representation), turn off the border (-setBordered:).
All of these options can be configured in IB as well. A tip: in IB, hover the mouse over any setting in the inspector panel - most if not all give you a hint that shows what method controls the behavior affected by the setting's control.

Resources