Gif in launch screen - ios

Im using this Class for gifs:
https://github.com/swiftgif/SwiftGif/blob/master/SwiftGifCommon/UIImage%2BGif.swift
But now, i want to add a gif to the launchscreen and since i can't set custom classes here, i don't know, how to do that. Any Ideas?

You can not use Custom classes in Launchscreen. Create a UIViewController and mark it as an entry point. Play the gif there and after a certain time you perform a segue to other ViewController. This little trick will work
UPDATED
In order to implement the logo animation we’ll need to do two things:
Add the first frame of the GIF as a static image in the launch screen
When the app launches add a view in the root view controller that
loads the animated GIF at the same spot that we’ve put the static
image in the launch screen
This way, when the app launches the user will get the impression that the launch screen is animating.
Have a look at Animated launch screen using a GIF in iOS

Related

Activity View Indicator isn't animating at LaunchScreen.storyboard

I want to use Activity View Indicator on my app while it's loading, so I have LaunchScreen.storyboard.
I use "Behaviour - Animating" on my AVI, but it is not animating.
When I use Act.V.Indic. not in LaunchScreen - it is animating.
The LaunchScreen storyboard is static. iOS actually creates an image from the LaunchScreen and displays that image. It is impossible to have any dynamic or animated content in a LaunchScreen storyboard.
If your app takes time to load, then your app should display another screen as soon as it starts and that screen should show the activity indicator view.
Launch screens are static. Even though you set it to animating, it won't animate, simply because it can't. Think of them as outlines for your launch images. iOS will generate an image from them, that'll be shown to the user. They are a more convenient way of generating launch screens but aren't interactive or dynamic.

launch screen customising

I'm new to swift and Xcode, and I'd like to know is there anyone willing to explain to me how exactly should I make my launch screen to show for 3 seconds and in that time slightly fades out?
I want to do a web view of a web page that I built previously, but want it to do the launch screen with fading before.
I've read all other questions related to the topic, but I don't understand them. Also have been following some tutorials on the subject, but nothing.
Anyone, please?
You can't do anything on your launch screen.But try this out and see if it's okay. Let's say you want to give a fade-in animation for an image in the launch. Let's assume that your launchscreen background color is blue. Make another viewcontroller and make this the first viewcontroller right after the launch screen. Make the background color of this view blue and add the image to that view. You can animate the image with UIView.animate method with a delay of 3 seconds or something. Doing this will make it look like an animation in the launch screen.
You can't do this in the launch screen.
That is not what the launch screen is for.
If you want to do this you will have to create a secondary "launch" screen that your app loads first and then load the web view and when it's loaded push another view onto the screen,

Custom animation in Launch Screen

I have created a new project in Xcode 7 using Swift. I noticed that the launch screen is stored in the storyboard file.
So I think if it could be customised by referring it to my CustomLauchScreenViewController. However, when I set the custom class name in LaunchScreen.storyboard, it throws an error:
Launch screens may not set custom classnames
So what is the best way to customize the LaunchScreen? I intend to use the LaunchScreen to load some data before launching the main screen.
That's not the purpose of the launch screen. What you can do however if have your first initial viewController 'act' as a launch screen. Just have it display the same image as the launch image and do what you need to do in there. Once you are done, move to your main viewController from there.
The launch screen is shown before your app starts executing in order to provide a transition from the Springboard to your app while it is loading. According to Apple interface guidelines,
A launch file (or image) provides a simple placeholder image that iOS displays when your app starts up. The placeholder image gives users the impression that your app is fast and responsive because it appears instantly and is quickly replaced by the first screen of your app.
To achieve a transition, remove the class from LaunchScreen.storyboard and set it similar to 0% loading transition. Create a new controller in your Main.storyboard and set CustomLauchScreenViewController there and assign this as initial view controller.
Set CustomLauchScreenViewController as your root view controller in your app delegate. When launch screen will be replaced by your this controller, transition is too smooth to feel any difference. After loading the data, change your root view controller to required View Controller.

Custom File for Launch Screen

I'm making an app where I need to program the launch screen, more than just placing images on the .xib file. Is there a way to connect a swift file to the launch screen so I can add animations?
I was thinking of doing something like Supercell does for Clash of Clans, where there's a loading bar and a short message users can look at while the game loads.
So is it possible to connect a swift class file to the .xib launch screen and how would one go about doing it?
Thanks
Unfortunately your app cannot process or display any animations during this launch screen. This is because the app is still technically loading.
Also it contradicts Apple's design guidelines for launch screens:
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
What you can do is add your own custom "animation screen" as the entry point to your Storyboard (or just root view) and create animations as you normally would through a View Controller swift file.

Can we use the sequences of 3 launch images in iphone/ipad

Can we use the sequences of 3 launch images in iphone/ipad?
No. A launch image is just one image (for that particular device/scale/orientation).
We show an animation in one of our apps, which starts immediately after launch (on the root view controller).
Technically not. But you can show additional images yourself after the app finished loading. The Default.png is used to display something (instead of a black screen) while your app loads.
Once it finished loading, it is immediately replaced with your main window's content. Then you can add UIImageViews or UIViewControllers to display anything you would like. But at this point your app is done loading and it would be a waste of time to show anything else, than your app's live content.
You cannot use sequence of images in default launch.
But you can do with the customise the code on view to change the images sequentially with a timing difference once the default image is loaded.
No. you can use only one image of different type of device like normal size,3.5 inch and 4 inch
You can add a new viewcontroller which will display the different type of splash screen image in the application didFinishLoading.
This way you display the more splash screen display a bit longer.

Resources