TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Unclaimed.
TDBSplashscreen is a pod that allow you to show your splashscreen a little longer while loading new data into your app
TDBSplashscreen is available through CocoaPods, to install it simply add the following line to your Podfile:
pod 'TDBSplashscreen'
To run the example project; clone the repo, and run pod install
from the Example directory first.
Here's an example of how you should use TDBSplashscreen
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[self.window makeKeyAndVisible];
// Create your root view controller
RootViewController *rootViewController = [[RootViewController alloc] initWithNibName@"RootViewController" bundle:nil];
self.window.rootViewController = rootViewController;
[TDBSplashscreen show];
// Hide splashscreen in callback
[[PayloadManager sharedInstance] loadInitialData:^{
// callback
[TDBSplashscreen dismiss];
}];
return YES;
}
You can also dismiss the splashscreen with a different animation
[TDBSplashscreen dismissWithAnimation:UIModalTransitionStyleCrossDissolve];
You can also add a completion handler to execute code when the splashscreen had been hidden
[TDBSplashscreen dismissWithAnimation:UIModalTransitionStyleCrossDissolve completion:^{
// Splashscreen has been dismissed
}];
Titouan Van Belle, [email protected]
TDBSplashscreen is available under the MIT license. See the LICENSE file for more info.