Sometimes it takes a longer time to present animations in iOS, so to avoid such cases we can go for animated .gif images. As it is very easy to show.
For example, let's have look at creating the animated splash screen.
If you are working with the iOS 8.0 and above, you need to setup the below process. For rest of the versions, it is not required.
As iOS8.0 come up with the default launch screen named LaunchScreen.storyboard which is associated with UIViewController. So here in this demo, I'm showing animated splash screen without using LaunchScreen.storyboard, in order to achieve that let's remove LaunchScreen.storyboard from the Info.plist.

Once you removed the LaunchScreen.storyboard it might show some warning similar to the image shown below.

Click on the warning it will ask to add the missing file. Let's add it.

After completing all these processes go into the coding. Let's override the -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions in AppDelegate.m
Note: Make sure to add the .gif to your resources

In order to show gif image on UIImageView, we have UIImage category here.
However, you can download complete source code Animated Splash screen demo.
1 Comments
If I am add gif in my app, after follow this steps.
ReplyDeleteMy app is approve in iTunes?