TDBSplashscreen 1.0.0

TDBSplashscreen 1.0.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Unclaimed.


Downloads

Total546
Week0
Month0

Installs

Apps24
Pod Tries1
powered by Segment

GitHub

Stars16
Watchers1
Forks0
Issues1
Contributors1
Pull Requests0

Code

Files4
LOCLines of Code 122


  • By
  • Titouan Van Belle

TDBSplashscreen is a pod that allow you to show your splashscreen a little longer while loading new data into your app

Requirements

  • ARC only
  • iOS 7.0+
  • iPhone (iPad soon)
  • Portrait orientation only (Landscape soon)

Install

TDBSplashscreen is available through CocoaPods, to install it simply add the following line to your Podfile:

pod 'TDBSplashscreen'

Usage

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

}];

Author

Titouan Van Belle, [email protected]

License

TDBSplashscreen is available under the MIT license. See the LICENSE file for more info.