XCode Interface Builder Background color - xcode

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.

Related

How to set color for a button in Xcode7?

Hi Im new to Xcode7 and Swift2 and I am trying to change the color of the buttons I am adding to my storyboard. Is there a way to change the color of the button in Xcode7? All I see are options to change color of text and add background image to a button but no change button color.
A button has many parts / aspects, so what do you mean by the "button color"? You probably mean the button's background color. If you scroll down in the button's attributes inspector, you'll come to the background color. The reason it's so far down is that it's a View (UIView) property, not merely a button (UIButton) property.

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;
{
}

How to set RGB color for UILabel in Interface Builder?

I know this can be done programmatically. But I wonder if there's a way to do this in Interface Builder, where I can see how the color looks without launching the app?
In Xcode with your UILabel selected, go to the properties panel. Double click on the color property, when the color selector window pops up, select the second tab (sliders).
There is a drop down box that you can select what type of slider you want RGB Slider is one of the options. When you select your color, simply drag it into the color property box.

Bring up Color Palette

How can I create an action so when a button is clicked the Apple color palette window appears? I do not want to use an NSColorWell.
Thanks!
Do you mean the color panel? There's a method orderFrontColorPanel in the Application place holder in IB -- just connect that to your button.

How to create a window looks like Tweetie Mac OS X app new post window

I have some questions about this window:
What type this window is (I've found that only "Textured Window" has rounded bottom corners)?
Why it doesn't have a title? Could I add it?
How to add a label to the title (word counter).
How to add a bottom bar?
This is just a plain old NSWindow. It's not textured. You can set a title with setTitle: in code or the Title field in the IB inspector. Tweetie's window doesn't have a title because the developer chose not to give it one.
The bottom bar is created by setting the content border on the window. Look under the Size tab in the IB inspector. (Uncheck "Autosize" and put in a value.) You can also pick "Large bottom border" from the popup menu in that tab and have IB set it up for you.
You can add a label in Interface Builder. Just type "label" into the Library filter search box and it will come up.

Resources