How Can I style the colors in the AVPlayerViewController Tab Bar Menu on Apple TV? - uitabbar

The AVPlayerViewController Tab Bar Menu on Apple TV is the following :
It appears when you swipe down on the control.
I want to change its background color to orange. Also I want to change the color of strings to orange when it's focused.
I was able to achieve this in a TabBarViewController's tab bar with the following code :
[UITabBarItem appearance] setTitleTextAttributes:#{ NSForegroundColorAttributeName : [UIColor whiteColor] }
forState:UIControlStateNormal];
[[UITabBarItem appearance] setTitleTextAttributes:#{ NSForegroundColorAttributeName : [UIColor orangeColor] }
forState:UIControlStateFocused];
[[UITabBar appearance] setBarTintColor:[UIColor blackColor]];
[[UITabBar appearance] setTintColor:[UIColor blackColor]];
How can I achieve this?

Related

Changing the background color in the theme for the class mat-app-background?

Trying change the background color for the class mat-app-background.
I assumed that the property that needs to be changed is the background property of the background map within the Angular theme.
The original value is #303030 and that is the the background color for the dark theme without any changes.
I tried changing this value with this function:
#function set-theme-background-color($theme, $color) {
$background: map.get($theme, background);
$background: map.merge(
$background,
(
background: $color,
)
);
#return map.merge(
$theme,
(
background: $background,
)
);
}
$dark-theme: set-theme-background-color($dark-theme, #4a8eb0);
And then generate the theme classes like this:
.dark-theme {
#include mat.core-theme($dark-theme);
#include mat.all-component-colors($dark-theme);
}
However as can be seen in this demo the background for the dark theme does not change.
How do we change the background color for the dark theme?

Background color of html is not comming in default print dialoag box

I have create one div, inside that there are some css applied (through the css file). Now I want to print that particular div from the whole page. The problem which I'm facing that all the css classes are applied in print dialog but background color is not applied.
Here is my code block of print button which opens a default print dialog:
$("#btnPrint").click(function () {
var contents = $("#Call").html();
var frame1 = $('<iframe />');
frame1[0].name = "frame1";
frame1.css({ "position": "absolute", "top": "-1000000px" });
$("body").append(frame1);
var frameDoc = frame1[0].contentWindow ? frame1[0].contentWindow : frame1[0].contentDocument.document ? frame1[0].contentDocument.document : frame1[0].contentDocument;
frameDoc.document.open();
//Create a new HTML document.
frameDoc.document.write('<html><head><title>Call</title>');
frameDoc.document.write('</head><body>');
//Append the external CSS file.
frameDoc.document.write('<link href="../css/abc.css" rel="stylesheet" type="text/css">');
//Append the DIV contents.
frameDoc.document.write(contents);
frameDoc.document.write('</body></html>');
frameDoc.document.close();
setTimeout(function () {
window.frames["frame1"].focus();
window.frames["frame1"].print();
frame1.remove();
}, 500);});
Here is the my div on page:
Here is the print dialog which shows the preview of the div:
Please help me to apply background print dialog.
Thanks
Option 1:-
If you dont mind about browser compatibility then use
-webkit-print-color-adjust: exact;
this will work only in chrome
Option 2:-
To make it printable(with image and colors) in all browsers you have to make the whole printing elements without background image and background colors.
Instead of them use image tag and border colors with #media print (read more)
Manual Options:-
you have to manually check the print background (Chrome : "background graphics", Firefox : "Print Background") while printing. this will display both background colors and background images. we can not control printing through code if you concern about browser compatibility.
Chrome:-
Firefox:-
[
for chrome and safari you can force printing background color by -webkit-print-color-adjust property rule, for example
body {
-webkit-print-color-adjust: exact;
}
read more about it here

Why isn't mix-blend-mode working on the font/text in this CSS?

I'm trying to use the CSS mix-blend-mode to make this text dodge over the background image but the css only seems to work on the div's background. I've seen it work on text before so why isn't it working here?
#draggable { mix-blend-mode: color-dodge; }
Demo: http://codepen.io/anon/pen/YyJGzo
The settings that you are using (text color and blend mode) are not noticeable
From the w3c page
10.1.8. color-burn blend mode
Darkens the backdrop color to reflect the source color. Painting with
white produces no change.
if(Cb == 1)
B(Cb, Cs) = 1
else if(Cs == 0)
B(Cb, Cs) = 0
else
B(Cb, Cs) = 1 - min(1, (1 - Cb) / Cs)
Where Cb == 1 means white in the backdrop (the text in your case), and B(Cb, Cs) = 1 means that the resulting color stays white. (Without any contribution from the background)
Try
#draggable{
color: green;
mix-blend-mode: screen;
}
or
#draggable{
color: grey;
}
demo codepen with grey text
for instance

Navigation Bar Back Button Arrow Font Swift

So I manage to change the font of the back button as said in this post
but now I have two arrows(<), one is the back button default arrow and the other is the button title arrow ("< Back").
How do I remove/change the back button default arrow to the font want?
One way is to create a transparent graphic and set it as the background image of your Backbutton.
So your code should look like this:
let backButton = UIBarButtonItem(title: "< back", style: UIBarButtonItemStyle.Plain, target: self, action: nil)
backButton.setTitleTextAttributes([NSFontAttributeName: UIFont(name: "RobotoCondensed-Light", size: 20)!], forState: UIControlState.Normal)
backButton.setBackButtonBackgroundImage(UIImage(named: "transparent_1px.png"), forState: UIControlState.Normal, barMetrics: UIBarMetrics(rawValue: 0)!)
navigationItem.backBarButtonItem = backButton

How to bring out the color in the box

What script error below?
var color = ["black","gray","silver","white","yellow","orange","red","brown","pink","purple","blue","aqua","green","lime","olive","navy","teal"];
for(a=0; a<color.length; a++){
document.write("<li><a href='#' class='color' id='"+color[a]+"'></a></li>");
the problem, in a box does not appear the color.
How to bring out the color in the boxes?