How to show loading screen while .DAE environment and characters are loading? - ios

I am pretty new at SceneKit and the first thing I noticed is the time it takes to load a DAE environment and characters. I've been looking for ways to show a loading screen while the environment is loading but none of them seem to work.
Whenever I push from menu screen to game screen, it would show around half of the menu screen and half of the game's screen with the UIKit components, and after about 3 seconds, then it shows the game screen without finishing the push animation transition. This is obviously not a good user experience so I would like to know how to add a loading screen until the environment shows up and preferably not freeze the UI because I want to find opponents in the backend as well as the user be able to cancel.
I currently have the entire views of game screen load in viewDidLoad. If you could provide an loading page example either a view or viewController that would be appreciated.

I created a custom UIKit progress bar to add some better affects and called a progressUpdate to move the bar. A gameNodes (sharedInstance) class where I cache and share node information with other classes. gameNodes->loadModels() does a call back every N/Total to update the bar. In gameViewController->viewDidLoad, I loaded the models after I created UIKit components and aligned them. I tried a splash screen to help, but I must have done it wrong because it never really worked. There is some wait time because scenekit had to load (in my case), so it wasn't perfect on all devices. However, it did produce what I felt like was reasonable feedback as the models were loading.

Related

Loading a SKScene from a ViewController

We're working on a small game where we needed to put a UITableView to summarize the highest scores, but when it comes to load back a SKScene from the said UITableView the app suddenly stops (no crashes or errors in the console, it just stops and freezes), is there a way to bypass this? The high score section is loaded from the Home scene, the same Home scene I'm trying to reach from the high score tableView.
Can you provide code?
Make sure there is no breakpoint triggered that may stops your code while running.
And a recommendation From my experience - you should try to avoid combination between UIKit and SpriteKit, this will solve you allot of problems. There are many open source libraries (here is one) that helps build UI components out of SKNodes.

How can I make a LauchScreen in XCode with Swift, with animation?

In XCode, how can I make a LauchScreen, that moves a square after 45% loading. Delaying is not the best, because launch times differ by memory usage, phone model, etc.
So after loading 45% of the app, the next 10% animates a square into the center of the screen.
Thanks in advance!
Edit:
It would be a table game with 9( 3^2 ) places to place your coins on. The loading screen is the bottom and the middle row are in place, but the top row only has 2 squares on start, pushed to the right. As the loading process progresses, the squares move to the left. Upon finishing the loading, the same screen remains with the menu on the bottom displaying, but that's just a tab bar.
You can't, the loading screen is static, even if you use Nib or storyboard.
The only thing you can do is start your app as fast as possible, by only loading a simple screen and displaying it right after your app is started.
Then load the more complex part of your app and remove this loading screen once your app has completely started.
As stated in the documentation, the Launch Screen is there to give the impression of quick loading.
Design a plain launch image that improves the user experience. In particular, the launch image isn’t an opportunity to provide:
An “app entry experience,” such as a splash screen
An About window
Branding elements, unless they are a static part of your app’s first screen
If you want something animated when the app launches, create a custom class, but keep in mind:
Because users are likely to switch among apps frequently, you should make every effort to cut launch time to a minimum, and you should design a launch image that downplays the experience rather than drawing attention to it.
Edit: I missed your edit, and understand your intentions!

iOS animation flip book cover and ease up

I have a scroll view, and few buttons/images there. on clicking I would like such animation :
(image opens like )book cover opens, and related view controller opens with ease in animation and gets full screen.
Any thoughts ?
Something similar happening in cook app
Link of cook app : https://itunes.apple.com/us/app/cook/id687560846?mt=8
Edit : I have added animation, gif will run uninterrupted once completely loaded.
Might I suggest iBooksOpen, a library that provides a book opening animation. It's pretty lightweight and should meet your needs.
(Only drawback: it opens a single page to the whole screen, but you could adapt the geometry if you wanted a page-folding-open effect.)

iPhone SDK - possible to have multiple splash screens?

I'm making an app with a different screen for its first run. Once it has completed its first run, this screen is never shown again. The issue I have is that my launch image is built to look like the view that the user sees every other time they run the app, so at first run the loading screen looks weird. Is there any way to have one loading screen for first run and one loading screen for other runs? Thanks
You cannot have multiple or dynamic launch images. Even with the new storyboard/nib launch files, they are still quite static.
Make sure to open an enhancement report with Apple, requesting this feature.
In the meantime, consider a slight change of your flow to first display the initial view, and have an animation to display your first-launch view. This way, the transition will be smoother and more natural to your users.

Progressively load subviews to speed up iOS app performance

I'm looking for a technique to progressively load in the contents of a UIViewController to make an app feel "snappier". I noticed this issue when pushing a viewcontroller onto the stack there's a noticeable delay while waiting for it to push in. The UIViewController's View has some complex subviews with transparency. I'm wondering if I create them after viewDidAppear and 'fade' them in, then the transition will appear much smoother.
I noticed a similar effect in Apple's Trailers app. When tapping a movie in that app the detail view pushes in and the contents load after the fact. Granted part of that delay is because they are downloading the details before showing them, but it seems like they always fadein that large image whether it's been downloaded already or not.
Has anyone had much success with this or with improving UIViewController loads in general.
Before you start making changes in an effort to improve performance, use Instruments to profile your app and find out where the problem really is. Is it in drawing the complex subviews? Is it in loading the data? The only way to know is to measure.
There's no reason you couldn't do as you propose -- have the view controller create/load its main view and then add the complex subviews afterward. Your view controller can add and remove subviews at will. Will that make the app feel snappier? It might -- it's similar to the default image strategy Apple built into iOS, where the OS loads a picture of your interface to make the device seem responsive, and then substitutes the real interface once that's ready. On the other hand, if the user still has to wait for the complex subviews to be created before the view is useful, seeing the rest of the view might not help much.
Another possibility (again, after measuring) might be to create the views before the user needs them. This runs counter to the lazy initialization that iOS apps commonly use to conserve memory and power, but if you know that you're going to need the views and you can expect a lull in user activity before they're needed, it could be a good way to increase the app's apparent speed. All you need to do to get a view controller to create/load its view is to access its view property.

Resources