![]() ![]() At the end of it, your ViewController.h file should look like this: #import Give your outlet a name and let it be of type FLAnimatedImageView. Open the Assistance Editor in Xcode such that the Storyboard and your ViewController.h files are side by side.Ĭontrol drag from each of the image views in the storyboard to your ViewController.h file between the and statements.The objects are of type FLAnimatedImageView which is a subclass of UIImageView. In the ‘Class’ text field enter ‘FLAnimatedImageView’.ĭo this for all 3 UIImageView objects. ![]() Now click on one of the UIImageView objects that you added to the storyboard and under the Identity Inspector on the right, locate the ‘Custom Class’ section.Resize them so your storyboard looks like the one below. Open the Main Storyboard file and add 3 UIImageView objects from the Object Library in the Utilities area on the right.When prompted, select the ‘Copy items into destination groups folder’ and click ok.ĥ) Open your ViewController.h and add the following import statements: It should be located in the folder hierarchy:įLAnimatedImage-master -> FLAnimatedImageDemo -> FLAnimatedImage Locate the following four files and drag them to the ‘Library’ folder in Xcode that you created in Step 3. Name this folder ‘Library’.Ĥ) Now open the folder where you saved the FLAnimatedImage library you downloaded in Step 2. A new folder gets added to your project files. (Just download the ZIP file to your disk)ģ) Open Xcode and right-click the project in the project navigator and choose ‘New Group’. Enter a class prefix and choose iPhone from the devices drop down menu.Ģ) Download Flipboards FLAnimatedImage library from github: Open Xcode, create a new project and choose the “Single View Application” template.Įnter Product, Organisation & Company names. This post will walk you step by step through the process of doing so.ġ) This is what your app will look like if you follow all the steps (it’ll be smoother in the simulation, had to convert a. Following this, your app will support animated GIF’s. (key development by Flipboard engineer Raphael Schaad, follow him on twitter)Their library makes it a piece of cake to add animated GIF’s to your iOS applications using storyboards in Xcode. After trying a few, I have come to rely on the super-easy to integrate solution by Flipboard Inc. There are many convoluted solutions available on the interwebs. There is no out of the box support provided by Apple to add animated GIF’s to your iOS applications. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |