Fireship · @fireship

Custom Ionic Splash + Animation

Uploaded February 19, 2018 · Length 5:29

Custom Ionic Splash + Animation

Summary

Create a custom Ionic splash screen with animation, including generating graphics and adding CSS animation.

  • ionic splash screen
  • custom animation
  • cordova resources
  • css animation
  • native mobile apps
  • ionic development

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    [Music]

  2. 0:02

    almost all good native mobile apps have

  3. 0:04

    one thing in common and that's a

  4. 0:06

    high-quality loading page when you enter

  5. 0:08

    the app for the first time in this

  6. 0:10

    episode I'm going to show you how to

  7. 0:11

    build your own high-quality splash

  8. 0:12

    graphics with ionic we're going to make

  9. 0:15

    sure the graphics and the animation look

  10. 0:16

    good on both iOS and Android and I'm

  11. 0:19

    going to take a different approach than

  12. 0:20

    other tutorials out there have taken

  13. 0:22

    most importantly I want to show you how

  14. 0:24

    to avoid this ugly white page if you're

  15. 0:26

    using animations in your splash page hit

  16. 0:29

    subscribe if you're new and follow along

  17. 0:30

    with the source code at angular firebase

  18. 0:32

    comm I am starting out from a brand new

  19. 0:35

    ionic app and using the side menu

  20. 0:37

    starter template before we do anything

  21. 0:39

    with animation I first want to show you

  22. 0:41

    how to generate an app icon and static

  23. 0:43

    splash page from the command line start

  24. 0:46

    by going into the resources directory

  25. 0:47

    and delete the icon and splash PNG files

  26. 0:51

    then you'll need to generate your own

  27. 0:53

    graphics and something like Photoshop or

  28. 0:55

    sketch the app icon needs to be at least

  29. 0:58

    a thousand 24 pixels and the splash page

  30. 1:00

    needs to be at least 2732 pixels

  31. 1:04

    once you have those created you can just

  32. 1:06

    go ahead and save them back in the

  33. 1:07

    resources directory with the same name

  34. 1:09

    splash and icon from there we can

  35. 1:12

    generate all of the icons we need for

  36. 1:14

    every single device on a given platform

  37. 1:16

    all you need to do is run I on it

  38. 1:18

    Cordova resources from the command line

  39. 1:20

    and it's going to do everything else for

  40. 1:22

    you this takes your source images and

  41. 1:25

    resizes them so they look good on the

  42. 1:27

    iPad iPhone and other mobile devices you

  43. 1:30

    can see the results by going under the

  44. 1:32

    platform directory under resources and

  45. 1:34

    looking at all the generated graphics if

  46. 1:37

    you open your app on a native emulator

  47. 1:39

    you should see the custom graphic as

  48. 1:40

    well as the custom splash screen that

  49. 1:43

    looks pretty cool and is probably enough

  50. 1:45

    for most apps but I still want to show

  51. 1:47

    you how to take things a step further by

  52. 1:48

    adding your own custom animation the

  53. 1:51

    easiest strategy in my opinion is to use

  54. 1:53

    a CSS animation but you could also use

  55. 1:55

    JavaScript here as well to keep things

  56. 1:58

    simple I'm going to use a pre-built

  57. 1:59

    open source animation but you could