Customize moreNavigationController - iphone

I am trying to customize the moreNavigationController in a UITabBarController. I have been reading a lot of posts and guides to style this and I have managed to change the tint color of the navigation bar and the background color of the table view but there are still a few things that I would like to customize.
I have changed the tint color and the background like this:
tabcontroller.moreNavigationController.navigationBar.tintColor = [UIColor orangeColor];
tabcontroller.moreNavigationController.topViewController.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:#"tableview-background-blue.png"]];
tabcontroller.moreNavigationController.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:#"tableview-background-blue.png"]];
I would like to change the seperate color (the border) of the UITableView. I would also like to change the tint color of the navigation bar which appears when clicking "Edit". Also it would be great if I could change the language of the whole thing (the "More" and the "Edit" tab and so on)
Would these changes be possible and if so, do you know how?

I think you can't change the names of this tabs, which are predefined. I'm taking about the Edit button & the more tab.

Related

iOS7 navigationBar and TabBar Color is behaving strangely

This is what I want. It loads on some of my view controllers.
Hi all,
I am going nuts trying to make the tint color of all of my viewControllers the same. Some appear to be much darker than others. All I want is the light color to be throughout...
Sometimes I get this ugly dark gray instead... I am not sure what I am doing incorrectly. I have checked the .m file and am not setting the tint color or anything... not sure why it wouldnt be consistent on every viewController...
Any help would be great. Thanks!
in iOS7 navigation bar is by default translucent=YES so just change to NO like bellow:-
self.navigationController.navigationBar.translucent=NO;
and set Navigaitonbar color or other property customize like Bellow put this code into Appdelegate class didFinishLaunchingWithOptions and use appearance for applying Globally:-
if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1) {
// Load resources for iOS 6.1 or earlier
[[UINavigationBar appearance]setTintColor:NavigationColor];
} else {
[[UINavigationBar appearance]setTintColor:[UIColor whiteColor]]; // it set color of bar button item text
[[UINavigationBar appearance]setBarTintColor:[UIColor GreenColor]]; // it set color of navigation
[[UINavigationBar appearance] setBarStyle:UIBarStyleDefault]; // it set Style of UINavigationBar
[[UINavigationBar appearance]setTitleTextAttributes:#{UITextAttributeTextColor : [UIColor whiteColor]}]; //It set title color of Navigation Bar
// Load resources for iOS 7 or later
}
For tabBar also same this is by default translucent=YES change to NO
[self.tabBarController.tabBar setTranslucent:NO];
A common mistake is setting the view.backgroundColor of the View Controller to clearColor (both programmatically or via Storyboard). This makes the view actually black instead (since there's nothing beneath the clear view), so everything that is above that view, that has translucent property set to YES, will show dark grey color (black color + default iOS blur).
To fix this, either set the translucent property to NO (as Nitin Gohel said), or set the view.backgroundColor to white, which's its actual default color.
Hope this still helps someone!
Since iOS 7.1 there's a bug, which causes UITabBar to not listen to Global Tint.
See this post: https://stackoverflow.com/a/22323786/1255674
You need to set the tint programmatically. Thanks, Ive ...

UISearchBar scopebar tint color issue

While using uisearchbar with scope bar the tint color of scope bar is not updating in iOS 4.3.In remaining iOS versions it is working perfectly.I have shown the screenshot of that sample here.Any ideas to solve this please.
for (id subview in yourSearchDisplayController.searchBar.subviews )
{
if([subview isMemberOfClass:[UISegmentedControl class]])
{
UISegmentedControl *scopeBar=(UISegmentedControl *) subview;
[scopeBar setSegmentedControlStyle:UISegmentedControlStyleBar];
[scopeBar setTintColor: [UIColor redColor]];//you can also set RGB color here
//scopeBar.tintColor = [UIColor blackColor];
}
}
Also see my answer from this link for modify the UISearchBar component
How to change inside background color of UISearchBar component on iOS
If I remember correctly, it was not possible to change a tint of the scope bar. One solution could be to search all the subviews of the search bar and find the scope bar object and try to modify its background. But this might lead you to modifying private property so it might not be acceptable. I was trying going this way but I abandoned it, not sure why.
Other not so clean solution would be to implement the scope bar by yourself and add it as a subview to the search bar and block the original scope bar. Do this only for the iOS 4.3 or less.
Change the tint color for changing color of scope bar. Note BarTintColor is different - this will change the color of the search bar.

UIBarButtonSystemItem PageCurl does not change color with the toolbar

I wanted to change the color of the navigation bar and tool bar, but the color of the page curl system icon UIBarButtonSystemItemPageCurl does not change with the tool bar tint color. If I use other system icons like bookmark, they will change. Does anyone have a solution for this sort of problem?
I used the following lines to change the color of the navigation bar and the tool bar.
self.navigationController.navigationBar.tintColor = [UIColor redColor];
self.navigationController.toolbar.tintColor = [UIColor redColor];
Here is a screenshot showing that the Page Curl color does not change:
Try setting the tintColor for UIBarButtonSystemItemPageCurl before adding it to the toolbar? This was certainly an issue when I last looked in iOS 4.3.

edit/done button, change done button background color

I have a UITableView with a navigation bar on the top. I changed the style of the navigation bar to Black Opaque to go with my theme.
I added an edit button as well using the below line of code
self.navigationItem.leftBarButtonItem = self.editButtonItem;
All is fine so far, the edit button also appears in the balck opaque style.
however the done button appears in the default blue theme. Am i missing some simple thing? How should i change it?
Help would be appreciated
The done button is always blue on a UIBlackBarStyle Navigation bar, but will adjust its color if you use the tintColor property of the navigationBar to color it in your chose of colors. I haven't tried it, but an idea would be to set
self.navigationController.navigationBar.tintColor = [UIColor blackColor];
this should give you a Black navigation bar with a black done Button.
However, for consistency reasons you can not directly set your custom background color on the done button.

iPhone UISegmentedControl button states on black UIToolbar

I have a UISegmentedControl on a black UIToolbar. I have set the style to Bar and set the background color to clear (also tried black). I have tried setting the tintColor clear (also tried black). My buttons turn black to match the black UIToolbar. However, the buttons no longer indicate a clicked state like they do when the UISegmentedControl is the default blue/grey. What do I have to do to make the buttons indicate a black/grey clicked state? Please let me know. Code used so far to set the color of the UISegmentedControl:
viewTypeSelection.segmentedControlStyle = UISegmentedControlStyleBar;
viewTypeSelection.backgroundColor = [UIColor clearColor];
While not a perfect solution, this works pretty well
// set the color
viewTypeSelection.segmentedControlStyle = UISegmentedControlStyleBar;
viewTypeSelection.tintColor = [UIColor darkGrayColor];
The buttons have state change and it looks OK. Here is a post that has a few more details and might help someone looking for a similar solution:
UISegmentedControl black?
You may have set the color of the bar with tintColor instead of setting barStyle like so:
self.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;