When I got to know Rainer Brockerhoff, one of my first questions was about networking. One of his advices was to write some open source code. A few days ago I was working on my customer’s app. He needed something similar to Apple’s 360° demo. I did not want to do that on a UIWebView as the performance is not the best. After looking for a view that does that, I found there was no one available. So I decided to write my own. Now I’m releasing it as an open-source project. The first of many.
FVImageSequence is basically a subclass of NSImageView/UIImageView that allows you to create the 360° effect by using a sequence of images. To use this view, you will have to add a image sequence to your project. All images must have the same prefix(i.e. myimage0.png, myimage1.png, myimage2.png). Set the prefix of the images you want to use by setting the prefix property.
You must also set the number of images. Just set the numberOfImages property in order to do that.
Also, don’t forget to set the property extension with the extension of the files(i.e png, jpg, gif).
Optionally you might set the increment property. This property basically tells the view how many images it should increment. If instead of incrementing 1 image, you want to increment 5, just set it to 5.
If you’re using the iOS version, don’t forget to enable the user interaction on Interface Builder.
Download the source code and the sample project from this link.