Q:

Can I write a generic function to modify UI elements across all of my view controllers?

I would like to know if there is a way where I can write a generic function that can be stored in something like a Utility class that will modify UI elements?
In other words, right now I'm changing the color of certain UI elements programmatically like so:
headerLabel.textColor = [UIColor colorWithRed:red green:green blue:blue alpha:1.0];

//Where red, green and blue are variables that are derived from another function 
//that converts Hex to RGB and 'headerLabel' is a UILabel with a connected IBOutlet

This same procedure happens in every View Controller, so I was wondering if there is a way to make this a generic function?
In Java / the Android SDK, I can pass the context of the class and do the rest from there.
Thank you in advance!!
EDIT:
To re-phrase the question a little, I would like to have the headerLabel.textColor= function, and other methods like headerLabel.text = @"foo" in that generic class, not necessarily just the color function.

A:

If you want to have HEX->UICOLOR in all of your files, put this:
#define UIColorFromHEX(hexValue) [UIColor colorWithRed:((float)((hexValue & 0xFF0000) >> 16))/255.0 green:((float)((hexValue & 0xFF00) >> 8))/255.0 blue:((float)(hexValue & 0xFF))/255.0 alpha:1.0]

in your Prefix.pch file. Then, in every file, you can change colors via
something.color = UIColorFromHEX(0xCCCCCC);

You can define everything via #define macro. If you want to define headerLabel.textColor, use 
#define setHeaderLabelColor headerLabel.textColor = [UIColor ...]

A:

yes , its possible by creating a global file to store all your colors ,preferences like navbar,title etc,
create a class like gconstants , then store all your string here in h/m files
 extern NSString *const APP_TITLE;

 @interface UIColor (APP)
+(UIColor *) APP_NAV_COLOR;
 @end

in .m file
 NSString *const APP_TITLE = @"APP Name";

@implementation UIColor (APP)

+(UIColor *) APP_NAV_COLOR { return [UIColor colorWithRed:00/256.0 green:111/256.0    
 blue:59/256.0 alpha:1.0]; }

@end
and in any controller declare the header file
 self.navigationController.navigationBar.tintColor = [UIColor APP_NAV_COLOR];

headerLabel.textColor = [UIColor APP_NAV_COLOR];

self.title = APP_TITLE

