My issue is with the splash screen shown when the app opens while in suspended mode.
When the app is closed and i open it, i see the Default.png splash screen, which is what i need.
But if i send it to the background and reopen it, i see a snapshot from the last screen i was in, and i want to see the splash screen.
I have even considered forcing the app to quit on when entering background, but i'd rather show a snapshot than do this.
How can i accomplish this?
Thank you.
You can't change the image that is shown when the app starts (Default.png) or enters the foreground (snapshot of previous app state).
Ask yourself, how would showing a splash screen each time the app enters the foreground improve the user experience?
Edit: Here's a guess at a workaround:
Based on your comment below, it sounds like you're saying it would be OK if the user always came back to the main action screen. In the applicationWillResignActive: method, could you check what screen the users is on, and if it's not the main action screen, move back to that screen... the snapshot would be of the main action screen then (maybe!)
Related
I'm adding app linking to my android app and I'm noticing on cold starts there's this long period of a white screen, which the user could interpret it as the app is not responding.
I have a splash screen for normal operation of the app on the main activity using a special theme, but it looks like app linking bypasses that activity so is there a way to show a splash screen on the other screens when the app is accessed by a link action?
EDIT:
quick summary, the splash screen appears during the normal use of the app but when a link triggers the app to open, it's not.
I figured out a solution for myself.
I simplified the intent filters to all call from the main activity that has the splash screen so it will appear now on cold starts.
this cleaned up a few other issues so it's a win overall for me.
I've noticed that when I go off an app like Snapchat, Twitter etc for a few seconds then go back on it, it opens from background as expected, on to the view controller I was last on. However, if I go off the app for more than a few minutes, when I tap on the app it loads the splash screen again and opens the home page.
I initially thought this was standard iOS behaviour, but when I installed my app onto my device I have noticed that even if I go off it for hours, when I come back onto it, the last view controller I was on is shown.
I have thought about checking how long the app was in background by saving times in NSUserDefaults, but don't actually know if this is the right way of going about achieving that kind of behaviour?
Thanks!
I was hoping to create a small windowed screen when the home button is pressed. It would keep a portion of the app process open while another app isn't open.
So say I had music playing on the app and when the home button gets pressed the screen would be windowed or shrunk and just displayed over the main screen (kind of like the little help button that can be moved around). Would using widgets in IOS 8 work?
When the user presses the Home button, the app goes to background, and that's it. You can't customize that action.
You only get a notification that the user closed the app so that you can save your app state or data for the next launch.
This question already has answers here:
Display a view or splash screen before applicationDidEnterBackground (to avoid active view screenshot)
(8 answers)
Closed 8 years ago.
The question is the following:
My app can be protected with a password. When the user presses home button, application resigns inactive. After reopening it, app shows "enter password" screen. But before it shows up, the initial content screen is visible for a moment. Also if, after pressing home button, user enters preview mode (home button double pressed), preview shows content screen, not password screen.
So here are two questions:
How can I change UI (to password screen or to some placeholder) before application gets resigned, so that in preview mode user would see something other than the content screen.
How can I make application NOT show content screen for a moment (before password screen) when application becomes active again.
Would be thankful for any help.
From the iOS App Programming Guide
What to Do When Moving to the Background
Apps can use their applicationDidEnterBackground: method to prepare
for moving to the background state. When moving to the background, all
apps should do the following:
Prepare to have their picture taken. When the
applicationDidEnterBackground: method returns, the system takes a
picture of your app’s user interface and uses the resulting image for
transition animations. If any views in your interface contain
sensitive information, you should hide or modify those views before
the applicationDidEnterBackground: method returns.
So, in your applicationDidEnterBackground method you should hide your main view and present your 'login' view.
Update After a bit more research, it turns out you can't present a view controller - you can only affect the root window. I have tested the solution in this answer - Display a view or splash screen before applicationDidEnterBackground (to avoid active view screenshot) and it works - So you can create an image that shows your login screen and put that over the top of your UI.
The splash screen of my app is showing when I reload the app after clicking the home button. It doesn't happen every time. It only happens when I press the home button while the app is creating a movie with AVFoundation and the reload the app.
Anyone have any idea why this is happening and how can I tackle the problem?
Thanks a lot!
It sounds like your app is actually being shut down, not just put in the background. It may be doing too much processing after being sent to the background so that the OS kills the app.