Loading view for iOS apps
A while back, and very early on in doing iOS development, I realised that sometimes the Network Indicator doesn't cut it when you want to tell the user that you're loading something.
For this reason, I created (what is quite common in apps) a loading view, that looks like the item below:
You can customise the text, and update it as your download updates (or as you finish a segment of your function).
The basic functions are:
+(void)OBTshowLoading:(UIView *)view withText:(NSString *)text; +(void)OBTshowLoading:(UIView *)view; +(void)OBThideLoading:(UIView *)view; +(void)OBTupdatetext:(NSString *)text forView:(UIView *)view; +(void)OBTupdatetext:(NSString *)text andWidth:(CGFloat)width andLines:(int)lines forView:(UIView *)view;
The UIView you supply would be your controlling view, such as self.view or self.navigationcontroller.view.
As you can see, you would call this by typing:
[loadingView OBTshowLoading:self.view];
Optionally, you could specify the text (as default, it says "loading...") like so:
[loadingView OBTshowLoading:self.view withText:@"My Text"];
Once you have finished whatever you were loading, you can then close the view, by typing:
[loadingView OBThideLoading:self.view];
I am constantly updating this library to finetune how it works, and tinker with existing settings, I will attempt to update this page as I update it.
This was last updated 7th May 2014.
Submitted on 07/05/2014