Maximus%20Agency
Maximus%20Agency
  • How We Work
  • Services
    • Development

      • Web Development
      • Mobile App Development
      • Shopify Development
      • CRM Development

      Marketing

      • Social Media Marketing
      • Direct Digital Marketing
      • Paid Advertising
      • Brand Strategy & Design

      IT Consulting

      • DevOps
      • Managed IT Services
      • Digital Transformation
      • Cloud Managed Services
      • AWS Services
      Banner

  • Portfolio
  • FAQ
  • Contact Us
  • ADDRESS

    Baldivis, Perth, Western Australia
  • EMAIL

    hello@maximus.agency

Stay Ahead with Tech Insights

Animate Ionic Splash Screen

Home / Animate Ionic Splash Screen
  • 23 July 2018
  • grant
  • 54 Views

(This article was written for Ionic 3, not 4)

So admittedly the title is a tiny bit of clickbait; however, the reason why people often search this exact phrase is because of the overly subtle gray loader/spinner icon and the fact that it is centered horizontally and vertically on your given splash screen, in Ionic. This can often lead to it being lost amongst your artwork and not adequately convey that background processing is occurring.

Thankfully there are plenty of tutorials out there that show you how to make a mock splash screen. This will help you make your own personal, custom splash screen. For the astute however, that is adding faux loading onto existing loading. If that is fine by you — here is the best one.

But if you want to minimise the amount of time a splash screen is shown and also indicate processing with a (IMO) clearly visible spinner, follow these simple steps:

Go into plugins then cordova-plugin-splashscreen then src and finally ios open up CDVSplashScreen.m this is the file we need to make a minor adjustment in.

Find the following line:

_activityView.center = CGPointMake(parentView.bounds.size.width / 2, parentView.bounds.size.height / 2);

and add some pixels to it — effectively pushing the spinner down by 100px; you can decide however many pixels you desire.

_activityView.center = CGPointMake(parentView.bounds.size.width / 2, parentView.bounds.size.height / 2 + 100);

Next, if you’d like to change the dull gray to a brighter white and slightly enlarge the spinner, you can do the following. Find this line:

UIActivityIndicatorViewStyle topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray;

Change it to:

UIActivityIndicatorViewStyle topActivityIndicatorStyle = UIActivityIndicatorViewStyleWhiteLarge;

Done! Now, to apply these changes, you must first perform the following “apply those changes” commands.

First, ionic cordova platform remove ios and then ios cordova platform add ios — if you find this doesn’t work, first remove ios.json inside of your aforementioned plugins folder. Emulate or run on your device and you’ll notice the spinner is a bit more noticeable now.

Perhaps in future releases this will be customisable; as the Ionic team always strives for the best for their user base. But for now I hope I bettered someone’s day with this bandaid!

Share:

Previous Post
Using Ionic
Next Post
Creating a

Comments are closed

Recent Posts

  • How Shopify POS and QR Codes Transformed Inventory Management
  • Securing Your WordPress: A Step-by-Step Guide to Recovery and Hardening After a Hack
  • LinkedIn Open Graph Image Challenges: Navigating Cloudflare
  • Upgrade Ionic 4 to Ionic 5 (Angular)
  • Getting Rid of the Admin Bar in WordPress for Front End

Recent Comments

No comments to show.

Recent Post

  • 24 October 2024
    How Shopify POS and
  • 4 September 2024
    Securing Your WordPress: A
  • 24 November 2023
    LinkedIn Open Graph Image

Category List

  • Uncategorised 2

Tags

Maximus%20Agency
  • Perth Office

    Baldivis, Western Australia, 6171

Services

  • Web Development
  • Mobile App Development
  • Shopify Development
  • Custom CRM Development
  • Cloud Managed Services
  • Managed IT Services
  • Digital Transformation Services
  • AWS Services
  • DevOps Services
  • Direct Digital Marketing
  • Social Media Marketing
  • Paid Advertising Services
  • Brand Strategy & Design
  • hello@maximus.agency

2025 Maximus Agency  Terms | Privacy | SiteMap