Hi: I'm sure this question is fairly simple to answer... is there any way to make variables and helpers available application-wide on the iPhone, without using the Application delegate?
Thanks!
------------ edit ------------
Thanks for your help. your comments helped! This is how I implemented my solution...
UIColor+Helpers.h:
#import <Foundation/Foundation.h>
@interface UIColor (Helpers)
+ (UIColor *)getHexColorWithRGB:(NSString *)rgb alpha:(float)theAlpha;
@end
UIColor+Helpers.m
#import "UIColor+Helpers.h"
@implementation UIColor (Helpers)
+ (UIColor *)getHexColorWithRGB:(NSString *)rgb alpha:(float)theAlpha {
unsigned int red, green, blue;
NSRange range;
range.length = 2;
range.location = 0;
[[NSScanner scannerWithString:[rgb substringWithRange:range]] scanHexInt:&red];
range.location = 2;
[[NSScanner scannerWithString:[rgb substringWithRange:range]] scanHexInt:&green];
range.location = 4;
[[NSScanner scannerWithString:[rgb substringWithRange:range]] scanHexInt:&blue];
return [UIColor colorWithRed:(float)(red/255.0f) green:(float)(green/255.0f) blue:(float)(blue/255.0f) alpha:theAlpha];
}
@end
One further question... would this be an accepted place to put my configuration global constants?