QLPreviewController customise the title color of the navigation bar? - ios

I can not create a custom QLPreviewController. Can someone help me with the code?

You can do it with appearance
Like this :
[[UINavigationBar appearance] setTitleTextAttributes:
#{NSForegroundColorAttributeName: [UIColor whiteColor]}];

Related

UINavigationBar background color not the exact UIColor that is set it to

I am using this color code #142148.
OutPut top bar view
[[UINavigationBar appearance] setBarTintColor:Default_blue_color];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
[[UINavigationBar appearance] setBarStyle:UIBarStyleBlackOpaque];
I think tint is just a tint, not an exact color.

UINavigationBar: Adding navigation bar not able to change color or title

I add it a UINavigationBar on interface builder on my story board but I want to change the color and title of the UINavigationBar programmatically but it doesn't work. Here is my code:
self.navigationController.navigationBar.tintColor = [UIColor redColor];
self.navigationItem.title = #"New Title";
Any of you knows why this happening or a way around this?
I'll really appreciate your help.
Try:
self.navigationController.navigationBar.barTintColor = [UIColor redColor];
These kinds of things can also be done in interface builder when you have access to the reference (and previewed)
try this code
self.navigationController.navigationBar.titleTextAttributes = #{NSForegroundColorAttributeName:[UIColor blueColor]};
if you want to change navigation bar background color,
use
self.navigationController.navigationBar.barTintColor
you can also use these code to change the navigationbar in global.
[[UINavigationBar appearance] setBarTintColor:RGB(248, 248, 248)];
[[UINavigationBar appearance] setTitleTextAttributes:#{NSForegroundColorAttributeName:COLOR_NAV_GLOBAL}];
[[UINavigationBar appearance] setBackIndicatorImage:[[UIImage imageNamed:#"nav_back"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
[[UINavigationBar appearance] setBackIndicatorTransitionMaskImage:[[UIImage imageNamed:#"nav_back"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:33.0/255.0 green:30.0/255.0 blue:94.0/255.0 alpha:1.0];
self.navigationController.navigationBar.titleTextAttributes = [NSDictionary dictionaryWithObject:[UIColor whiteColor] forKey:NSForegroundColorAttributeName];
put this in the view did load method.
first one is for the navigation bar tint color and the second one is for the title font color.

Change Color of navigationBar of just UIActivityViewController

How do you change the colour of only the UIActivityViewController?
I want to change the colour of just the UINavigationBar of the UIActivityViewController using something like:
self.activityViewController.navigationController.navigationBar.barTintColor = [UIColor greenColor];
I would suggest to change the background color of the UINavigationBar before creating and presenting your UIActivityViewController with:
[UINavigationBar appearance].backgroundColor = [UIColor greenColor];
HTH
Following code maybe help you:
[[UINavigationBar appearanceWhenContainedIn:[UIActivityViewController class], nil]
setTintColor:[UIColor greenColor]];

iOS 7 customize text color of quick view launched from document interaction controller

I'm developing an iPhone app.
I have set the color of the navigation bar to blue, and the text to white using
[[UINavigationBar appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor whiteColor], NSForegroundColorAttributeName,
nil]];
in the delegate.
In a view controller I use a Document interaction controller to share a pdf, but when I choose to print it, or to open with Quick Look, those apps are presented with the standard white navigation bar of the system, but with the text in white, which makes the title and the buttons unreadable.. how can i fix this?
I've already tried to take a look at the methods of the UIDocumentInteractionControllerDelegate, but I couldn't find a solution..
This is how the print view appears:
In iOS 7 you can set UINavigationBar color by calling this in delegate class,
[[UINavigationBar appearance] setBarTintColor:[UIColor colorWithRed:65.0f/255.0f green:95.0f/255.0f blue:156.0f/255.0f alpha:1]];
And of course the title color by calling this,
[[UINavigationBar appearance] setTitleTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor whiteColor], NSForegroundColorAttributeName,nil]];
But always make sure when you set UINavigationBar color, check the os compatibility wheres we have to use different method in iOS 6 and below, And you can achieve that like this,
if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1) {
[[UINavigationBar appearance] setTintColor:[UIColor colorWithRed:65.0f/255.0f green:95.0f/255.0f blue:156.0f/255.0f alpha:1]];
}else{
[[UINavigationBar appearance] setBarTintColor:[UIColor colorWithRed:65.0f/255.0f green:95.0f/255.0f blue:156.0f/255.0f alpha:1]];
}

xcode - Design / Redesign MailController / MFMailComposeViewController

Is it possible to Redesign the MFMailComposeViewController?
How?
The App Dropbox can do it.
Picture: http://jonathangurebo.tumblr.com/post/40436277822
Can I change the "MessageUI.framework"?
To answer your request regarding customizing the appearance of ALL navigation bars in the app, use this in your application:didFinishLaunchingWithOptions: in your app delegate:
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:#"image"] forBarMetrics:UIBarMetricsDefault];
[[UINavigationBar appearance] setTintColor:[UIColor blueColor]];
[[UINavigationBar appearance] setAlpha:1];
//change background image and tint color for navigation buttons
// Set the text appearance for navbar
[[UINavigationBar appearance] setTitleVerticalPositionAdjustment:2 forBarMetrics:UIBarMetricsDefault]; //change vertical appearance of navigation bar title
[[UINavigationBar appearance] setTitleTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor whiteColor], UITextAttributeTextColor,
[UIColor clearColor], UITextAttributeTextShadowColor,
[NSValue valueWithUIOffset:UIOffsetMake(1, 1)], UITextAttributeTextShadowOffset,
[UIFont fontWithName:#"HelveticaNeue" size:22], UITextAttributeFont,
nil]]; //set custom font info

Resources