Dark Black & Opaque UIToolbar - objective-c

I am trying to create a UIToolbar which is dark black (real black as opposed to UIToolbar's "black"), that is slightly transparent or opaque. Below is a screenshot of the exact colour/opacity that I want it to be. Its the black overlay on top of the burger image.
I tried setting the colour, setting alpha, opaque property, translucent and nothing is working. Any suggestions?

Just make a png that is the color and opacity you want, add it to your project, and [myToolbar setBackgroundImage:thatImage];
Oops actually I think the method is setBackgroundImage:forToolbarPosition:barMetrics:

Related

Cocoa NSStatusItem image – opaque background

I'm making a tiny menu bar app that shows the current iTunes song in the status bar. It works great, except for the fact that in dark mode, black areas of the album art show up the same color as the (transparent) menu bar background:
Is there any way to make this be an opaque black background, instead?
On the white background, it makes white be the white transparent background, but black is a nice, deep black (overall I find this less annoying):
Currently, I'm just using [statusItem setImage:artworkImage] to set the image.
For some reason, adding a transparent NSView as a subview of the status item's button works wonderfully:
let subview = NSView.init(frame: statusItem!.button!.frame)
statusItem?.button?.addSubview(subview)
Now, I still have no idea why it works.
Edit: This works up to OS X v10.13 High Sierra, but does not work on v10.14 Mojave. It's back to transparency.

How To Create An Anti-Aliased Transparent Form In VB.NET?

I have a problem with making forms with transparent background. when I set a color for the BackColor and assign that color to the TransparencyKey property, that back ground will be transparent but my edges will be sharp and the back color around the pictures will not hide and looks like a sharp ugly border. what should I do? How can I fix this?

NSOutlineView in NSPopover not readable in OSX 10.10 Yosemite

I have a NSPopover containing a NSOutlineView (source list) that is displayed over a usually dark background (but it's not always dark). The NSOutlineView has a transparent background to blend nicely with the NSPopover view. This looked great in OS X 10.9 but in 10.10 the system changes the text color in the NSOutlineView based on the background. The result is that the text becomes completely gray and unreadable in some cases:
If I change the popover to be HUD style it is more readable:
However, in this case, it becomes problematic with lighter backgrounds (the top).
Is there any way to control the text color in the NSOutlineView so that the color stays the same no matter the background? I have tried setting the color of the text cell to black instead of the system colors but it does not help.
Also, can I control/remove the transparency of the NSPopover? I have read that NSPopover makes use of NSVisualEffectView, which has some appearance controls, but I don't know how to access it from NSPopover.
For aesthetic reasons I do not want to put the NSOutlineView under a solid background view. In this case there will be a ugly mismatch in color between the popover background and its arrow.
EDIT:
I was able to remove the transparency using the following code:
NSView *popoverView = popover.contentViewController.view.superview;
popoverView.appearance = [NSAppearance appearanceNamed:NSAppearanceNameAqua];
It works but feels like a ugly hack. I welcome better suggestions.
EDIT2:
This is what it looks like with the aqua style. No transparency and black text.
Set the mode to something different other than source list and you should get the pre-10.10 style, i.e. without the translucency.

How to make a "within window" transparent/blurry title bar using a custom base color in Yosemite?

I've been playing around with NSVisualEffectViews in Yosemite and transparent titlebars but I was wondering if it's possible to have a custom title bar, with my own base color (not that gray), that would act like Apple's.
Here's my current NSWindow:
I achieved this look by setting the following code on my custom NSWindowController:
self.window.styleMask = self.window.styleMask | NSFullSizeContentViewWindowMask;
self.window.titleVisibility = NSWindowTitleHidden;
self.window.titlebarAppearsTransparent = YES;
That blue color is just a custom NSView that's painting its rect with that particular color. The content below it is a NSTableView.
So, the goal was to actually have my titlebar to work like, let's say, Maps but instead of having the "base" color as the gray color, my "base" color would be that blue one and when the NSTableView scrolls, that content appears below my title bar.
Any ideas on how to achieve this? Thanks
Have you tried setting a blue color with a transparency of, e.g., 0.75 in the blue view, and a NSVisualEffectViewunderneath it?

NSStatusBar item glow without the glow image on Xcode

How can i make something like this glow on a status bar item?
I know that i can do that with another png, but i have seen some other applications where they only have the black icon of the statusbar, no glow.
How can i do that?
Thanks
Just draw your image with a white drop shadow (some blur radius, no offset) in a custom view. NSShadow makes this very easy to do.