ios - Objective-C way or compiler directive to force a class file include a method without adding a protocol? -
I have a custom singleton mycolor class that can easily easily change the color of several buttons with many I put Everything works perfectly and setting the color value in Now, I want to change the vibrant colors so I send So every class sees it and immediately applies color. What do I have to do: Force XCode to remind me that OR: Add something like What I do not want to do: I do not want to make a protocol and it is not Yek So, I am trying to find a way to do this, or a compiler Ways to do this work XCode Thank you for sharing your thoughts. Update : I use color values for anything that just does not require the color of the buttons. Apply this functionality to a base class and all your UIViewController - i.e. - the base for this notification Modify the colors of the normal objects in the class register and change their additional objects colors to say a virtual method for the inheriters. Good luck, UIViewController s can change at the same time.
#import "MyColors.h" in every code I need to get the color of a button.
MyColors , the color is applied correctly where I want to.
NSNotification name
"COLORS_CHANGED" .
.m file containing
MyColors H is included to see the
colorsChanged method should also be included, therefore, it will stop the mistake of adding a supervisor to me
category or something like this
MyColors.h to do this ...
is .m Add as representatives to the files of the file, including
MyColors.h . Because I can forget it too .. If not, then it will be the perfect path ...
Comments
Post a Comment