I'd suggest two things:
- Make your
colorWithHexString:
a category class method onUIColor
. Then you can access the method from any class that imports your category .h file. - If you want every view controller in your app to have a customer color (or other common behavior), you should create a common base class such as
MyBaseViewController
. Have this class extendUIViewController
then have all of your app's view controllers extendMyBaseViewController
. Put all common setup in the base class. If you also need some table view controllers then create aMyBaseTableViewController
class with similar code.