TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Unclaimed.
Pronounced “Super Ogress” (as in a female Ogre who is also a super-hero), SuProgress is a utlitity library to show a iOS-7-Safari-style progress bar under the UINavigationBar for your app.
SuProgress is an easy to user, drop-in library for common progress types eg. NSURLConnection, UIWebView, and AFNetworking’s AFHTTPRequestOperation.
SuProgress was made by Mobile Makers, Chicago, an eight week intense learning experience that will take you from beginner to professional iOS developer.
SuProgress was mostly authored by Max Howell, a splendid chap.
SuProgress is super easy to use:
[viewController SuProgressURLConnectionsCreatedInBlock:^{
[NSURLConnection connectionWithRequest:request delegate:self];
}];
Any NSURLConnections created in that block have their progress proxied to the SuProgressBarView, which we also create and maintain for you.
Of course this means any frameworks or methods you call that operate via NSURLConnection will have their progress proxied. For example, the Facebook SDK:
[viewController SuProgressURLConnectionsCreatedInBlock:^{
[FBRequestConnection startWithGraphPath:@"/me" completionHandler:foo];
}];
Neat, right?
Here’s how to display progress for a UIWebView:
[viewController SuProgressForWebView:webView]
And AFNetworking:
[viewController SuProgressForAFHTTPRequestOperation:operation];
pod 'SuProgress'
;SuProgress.h
and SuProgress.m
into your projectCurrently we cannot handle NSURLConnections initialized via
sendAsynchronousRequest:queue:completionHandler:
. Please help us fix this!
Typically you need a progress meter for a multi-stage operation, eg. load Facebook data for a user, then load data based on that. SuProgress isn't much use for this eventuality yet, but it wouldn't be too hard to write a bit more API which says: divide the bar into three sections, etc.
We plan to make SuProgress
monitors for NSProgress
, NSOperationQueue
, pull
requests for any progress type welcome.
The example only builds with Xcode 5.
Copyright 2013, Max Howell, all rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.