Reputation: 133
I am using loading indicator with background image and label.
IBOutlet UIActivityIndicatorView *isLoading;
IBOutlet UIImageView *isLoadingImageView;
IBOutlet UILabel *loadingLabel;
In my app this loading set is called like 5 6 times from different controllers. Is there any easy way to write a class like:IndicatorClass and class methods like:showLoadingSet hideLoadingSet to bring this set infront of my view. For example in mapController, i just only want to call [IndicatorClass showLoadingSet] and [IndicatorClass hideLoadingSet].
What I am doing is that I am creating IBOutlets for each controller, it is totally waste of time.
Is there any suggestion?
Thanks
Upvotes: 0
Views: 195
Reputation: 50717
You can have a peak at the MBLoadingHUD
example. It sounds like you are trying to implement something similar to this. If not, you can always see how that class is used.
Upvotes: 1