开发者

Xcode add same view from different controllers using class method

I am using loading indicator with background image and label.

IBOutlet UIActivityIndicatorView *isLoading;
IBOutlet UIImageView *isLoadingImageView;
IBO开发者_Python百科utlet 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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜