Xcode UI Label not appearing after running the project - xcode

This is the UI appears in the simulator. It appears only when pressed.
This is the UI in Storyboard.

In fact, there were clickable layers on top of those labels, where User Interaction is enabled.
This then triggers the background color of the labels to turn into white.
It is not the labels are not rendered, it is just that text color, the background color of the label and the color of the view are all white.
NOTE: Apology for the question which lacks details.

Related

Button with colored background

I am using fyne. I am working on a game (with buttons obviously). I would like to know if there is a way to change button's background? I know there is button with image instead of text, but I would only like to change background color of button.
The Fyne widget APIs are based on meaning rather than graphics, which makes two potential answers.
You can mark a button as high importance (Button.Importance = widget.HighImportance) which will show as a primary colour.
If your application wishes to control colour then the way you do it is to place a background rectangle under the button, which will show through (e.g. as container.NewMax(canvas.NewRectangle(bgColor), button)).

Xcode invisible elements

I don't know what happened. Elements items like buttons or segmented control are invisible in main storyboard. Cellphone is the same.
I put the image, of what I mean
It looks like you accidentally changed the view's (or window's) Tint Color to white. (Or you could even have turned it to Clear color, or no color at all.)
This would cause the text of the button or segmented control to be invisible, because it is white on white. The segmented control has a border but it would turn white too. So you wouldn't be able to see anything.
There are two places to look to fix this. Look at the Tint popup of your view controller's View in the Attributes inspector.
Also look at the Global Tint popup in the File inspector for the whole storyboard.
[EDIT It turned out to be the Global Tint.]

Titanium - Android button "native" behavior upon styling

I've created 2 buttons:
<Button title="TEST"></Button>
<Button title="TEST" backgroundColor="red"></Button>
The first is a really simple default button. And the second I just added a red background color. The result is this:
As you can see from the picture, just adding a different background color changes the button a lot from it's "native" appearance. What I would expect is that the button will remain the same, just with a red background.
The "styled" button is bigger (and as you can see I did not set up any dimensions).
The "styled" button corners are no longer round.
Most bothering - the "styled" button no longer has the android button ripple effect upon clicking.
Why is that? Can it be fixed?
The native button (AppCompatButton) is a bit more complex and is not using the backgroundColor to show the actual color. I think it is using a 9-patch in the background so if you set a backgroundColor it will remove that and you end up with the box and the color.
Try using the tintColor to change the background color or you can fake it using:
borderRadius
elevation
touchFeedback
touchFeedbackColor

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.

Why does the default background of the uivew is black in IB xcode?

When i set the default background for the view (the view is used as a header for the table) in IB it becomes black but when I run the app on a simulator it has the default color of the uitableview background.
When i set the default color to yellow for example it is always yellow for both IB and simulator.
why the default background color is black in IB and gray with stripes in a simulator?
Because the Interface Builder in Xcode has bugs. I assume you mean you are setting the background color to the "default" option?
I have run into several similar bugs with background color, sometimes it even sets the background color of an element that isn't supposed to have a background color. What I usually do is right click on the xib or storyboard file and Open As Source Code. Then find my element and carefully delete the background property (make a backup of the file if you are concerned about accidentally breaking the complex xml file structure). Then open it as Interface Builder again and it usually figures things out.
Or, worst case, I delete the problem element or view and recreate it.
Edit: it also occurred to me that the default color could be the clear color, in which case, the texture is showing through the view, not being drawn as the view's background, and interface builder chooses black because A) it doesn't know what the view will be drawn on top of and/or B) the view or parent view is marked as opaque or something to that effect.

Resources