Setting UISearchBar to minimal with translucency - ios7

Is it possible to make a UISearchBar translucent with a background color and search field color that can be changed separately?
This is what I'm currently getting with a search style of minimal and a background of light blue. If I want the search field to be white, I have to not use minimal for the search style, but then my search bar isn't translucent.
What can I do?

Related

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?

How to change tab bar tint for multiple tabs in iOS 7

I have three sections in my app, each section has different tabs.
I was wandering if there is a way to change the tint on the selected tabs to different colours for each section.
For example,
Section one tabs selected tint colour set to default blue.
Section two tabs selected tint colour set to Green.
Section three tabs selected tint colour set to Red.
I know through storyboard file inspector you can change the global tint but can't seem to find an easy straightforward way for three sections of tabs.
Thanks
Each "tab" is actually the tabBarItem of one of your UIViewControllers (the children of the UITabBarController).
So look at the properties of the tabBarItem, which is a UITabBarItem. Notice that there is a selectedImage, different from the image (inherited from UIBarItem). So give each tab bar item an image and a selectedImage, and give that selectedImage the color characteristics you want (and make sure that you derive from it an image whose rendering mode is UIImageRenderingModeAlwaysOriginal so that your color is used, and not, as you say, the tint color).

XAML Theme Brushes - Switching Dynamically, cursor doesn't change

First Off, I found this extremely useful page on theme brushes:
http://metro.excastle.com/xaml-system-brushes
So Roughly, on startup for WinRT/XAML I am setting my theme brush for a textbox in a stylesheet:
Foreground = TextBoxDisabledForegroundThemeBrush
Background = TextBoxDisabledBackgroundThemeBrush
Which at run time makes the textbox appear as: white border, transparent background and grey text. Which I was hoping it would make it transparent, white border and white text.
On my Tapped event, I change the textbox to:
Foreground = TextBoxButtonPressedForegroundThemeBrush
Background = TextBoxButtonPressedForegroundThemeBrush
Which is supposed to be black background, white text and white border. Which seems right, but the cursor is back and you cannot see it.
First question is, am I doing this right to change my text color? I want to change the textbox so once it is selected it stays a changed color. I think this is correct. But I am not sure if I should be setting Foreground or maybe a Font Style instead?
Unfortunately you can't change caret color so if you want your TextBox editable - you should keep the background white or otherwise light. Otherwise, controlling the look of your control in its various states is best done using VisualStateManager and that is easiest to manipulate using Blend.

Background color of NSSearchfield not working

I have a NSSearchField and I want to change its background color but i am not able to do it i tried out few things:
1) I tried to set DrawBackground TRUE and then setBackgroundColor but the value of DrawBackGround is always False either I try to set it trough code or Nib.(i don't know why?)
2)I tried out setting NSText's BackgroundColor but it is not looking good because it is not covering whole NSSearchField the extreme corners where the small search icon and cancel icon is present are left uncolored.
3)I want the searchField to have the color of the view it is lying so i decreased the alpha value of the searchField which looks good but the alpha value of text is also decreased so is there any way to make text's alpha value to remain always 1.
Thanks :)
If you look at the documentation, Apple prevents background color rendering for rounded-rectangle fields:
"In order to prevent inconsistent rendering, background color rendering is disabled for rounded-bezel text fields."
https://developer.apple.com/library/prerelease/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSTextField_Class/#//apple_ref/occ/instm/NSTextField/setDrawsBackground:
NSSearchField is extension of NSTextField, NSTextField again extension of NSView,
Not sure, but its possible to make a custom clas and overwrite drawRect function and paint with the background color.

How to customize UISegmentedControl font color and UIToolbar gradient?

It seems Apple's UIToolbar and some of the controls you can place on it, such as UISegmentedControl, allow very limited customization. For example, we want our toolbar to looks something like this mock:
However, UIToolbar only has a single tintColor and 3 built-in barStyle values that you can apply to it, so we can't get the gradient we're after. Is there some way to set the background image like many of the other controls?
Even worse, the UISegmentedControl doesn't let you specify font or font color. It seems to enforce white 11pt Helvetica with a drop shadow, and the white is almost unreadable with the light tintColor we're using.
I'd hate to rewrite UISegmentedControl just to change the text color. But the only solution I've seen is very hacky -- it digs into the subviews of the subviews and changes properties on those -- seems likely to stop working whenever Apple feels like changing or disallowing it.
Is Apple really against us changing the text color on our segmented controls, or is there something I'm missing here?
Update: Apple finally added functions for customizing appearance in iOS 5. See jfortmann's answer.
You want to use the setBackgroundImage:forState:barMetrics: methods (probably on your appearance proxy) to set the background image. The text can be modified with setTitleTextAttributes:forState:. And finally, you'll need to change the divider for the possible states with setDividerImage:...
The docs are very informative as to how the images have to look.