UIActivityViewController compose window navigation bar color - ios

When choosing a sharing option from the activity view such as message or email composing, the navigation bar (or is it a toolbar) and title colours look terrible. The title and status bar items are almost unreadable.
I have tried to change navigation bar and toolbar tint, barTint, background and title colours with no luck. Also tried to toggle between default and light styles.
Changing navigation bar tint colours on the main view itself also renders no difference.
Any idea on how to solve this?

Are you using a custom background image for the navigationbar? If so, you need to set the background image to nil before presenting the compose sheet. Something like:
[[UINavigationBar appearance] setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];
Otherwise,
[[UINavigationBar appearance] setBarTintColor:[UIColor WhiteColor]];
should work.

Related

How to set delegate to UIActivityViewController of QLPreviewController?

My application's navigation bar buttons color is white..
So I used below code to set color for entire application.
[[UIBarButtonItem appearance] setTintColor:fontColor];
QLPreviewContoller by default having option for UIActivityViewController so while opening MailComposer from UIActivityViewController I am getting white navigation bar button because I have used appearance
Attached screenshot for reference.
Can anybody help me in solving this issue?
Issue is not with QLPreviewController or UIActivityViewController. May be you don't set any colour for navigationBar, by default navigation bar will take white colour as background colour and you are also setting white colour for bar buttons so result will be like above image only. Try to set colour navigation bar using appearance then you can see bar button items.

UIBarButton title text not showing up on modal view controller when "Button Shapes" accessibility feature is turned on

When I try to modally present a view controller the bar buttons on either side of the title of navigation bar are not showing up. This happens only when the "Buttons Shapes" accessibility feature is turned on under iPhone settings menu. It just shows up a plain blank white space. But when I try to tap the button I could see the button's presence and the button shape drawn around it.
Could some help and point me in right direction ?
Thanks
Check how you set tintColor, barTintColor, and barStyle of UINavigationBar's appearance. For a dark background and light foreground it works like this.
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
[[UINavigationBar appearance] setBarTintColor:[UIColor blackColor]];
[[UINavigationBar appearance] setBarStyle:UIBarStyleBlack];
It's all advisable to look at UIBarButtonItem's appearance, e.g. titleTextAttributes.
See also this answer.

Blur UINavigationBar like the photo app

How can I achieve a blur on a UINavigationBar similar to the one found in the Apple photos app?
When I use this code I cannot even see my bar:
[self.navigationController.navigationBar setBackgroundImage:[UIImage new]
forBarMetrics:UIBarMetricsDefault];
self.navigationController.navigationBar.shadowImage = [UIImage new];
self.navigationController.navigationBar.translucent = YES;
self.navigationController.view.backgroundColor = [UIColor whiteColor];
And in AppDelegate.m
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
The behaviour you are looking for is called translucency, and is the default behaviour of aUINavigationBar. Is this behaviour not occuring by default in your application? What have you tried so far? Some more information could help.
Here's a link to the documentation for this property specifically.
EDIT: I've found a similar question on SO with an answer that may help you if you're using a custom background image for the bar. Find it here.
The easiest way to make a translucent navigation bar is to do nothing, since that is the default.
You are basically preventing that from happening. Let's look at your code:
A bar's tint color is not its color. It is the color of its buttons and images. If you make the tint color white and background color white, you are creating white buttons on a white background. That is going to be hard to see!
The color of the bar, on the other hand, is the barTintColor. Set that, and set the translucent to YES. Experiment with various barTintColor values and see what happens.
Do not set the background color, as this complicates things.
And above all do NOT set the background image, especially not to an empty image, since this overrides everything else and punches a hole in the navigation bar, making it completely transparent.

make transparent navigation bar and transparent tab bar in ios 7.

how to create a transparent tab bar and navigation bar in ios 7 ? i tried setting
[[UITabBar appearance]setBarTintColor:[UIColor clearColor]];
but then a translucent tab bar appears. then i tried setting the translucency property of tab bar to NO
[self.tabBarController.tabBar setTranslucent:NO];
also the tab button is always highlighted in blue color. Even though i put different color images .
has anyone had similar experiences ? observed only in ios7
By default the selected tab button item has highlighted blue color and unselected has gray color. This behavior is a independent of tool bar item image color.
Example to change the selection color for tab Bar item
self.tabController.tabBar.tintColor = [UIColor redColor];

iOS5 UINavigationBar background image issues when prompt is shown

I am using the new appearance proxy in iOS 5 to style my UINavigationBar with a background image.
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:#"ZSNavigationBG.png"] forBarMetrics:UIBarMetricsDefault];
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:#"ZSNavigationLandscapeBG.png"] forBarMetrics:UIBarMetricsLandscapePhone];
This works fine, but I need to set the prompt property of the nav bar. When I do that, the height of the nav bar increases, and my background image no longer fills that nav bar vertically, so it looks very bad.
How can I account for the height change with a prompt when using a custom background image?
The image should be a stretchable image so it can extend in either direction without breaking anything.

Resources