I'm wondering if it's possible to have a slide with text AND add some animation into it for an iPad app. See screenshot below to get an idea of what I need. I want that guy jump up and down and smile. I'm sure I'm not capable of drawing that image using Objective-C primitives myself, so I'm looking at the following options:
Do complete animation in 3rd-party tool (Adobe?) and then add it as single standalone file on the slide. But I do not know, what formats are supported in iOS, what are standard formats, and, at the end, how to insert that file on the slide. Can somebody clarify this please?
Do complete animation, and then save frames as images, and then quickly change images to give illusion of a movie.
Am I missing something? Are there any other ways? what's the best option?
Please let me know if I'm not clear enough - I will try to provide more information.
Thank you.
If you want to use a movie file for the animation, you can find the supported video formats in the iOS Technology Overview, under “Media Layer > Video Technologies”. You will need to use an AVPlayerLayer from the AVFoundation Framework to show the video.
If you want to use a separate image file for each frame, you can use one of the +[UIImage animatedImage...] methods to create an animated UIImage, and display it in a UIImageView.
If you want to use a single animated GIF for the animation, you can use this public domain UIImage+animatedGIF category to load the GIF into an animated UIImage, and display it in a UIImageView.
Related
I have implemented crop functionality but
Is it possible to selection crop image like below link
http://deepliquid.com/projects/Jcrop/demos.php?demo=advanced
Short answer, not really unless you do some clever coding and view aligning / transforming.
Long answer, you have two options:
Create your own custom module with XCode, OBJ-C etc.
Just nest the Jcrop code in your own webview inside titanium. (This seems easiest).
I'm trying to create an objective C classe for my iPad application which can convert a powerpoint file to a jpeg file.
Accordingly i've to read into the pptx format to see how the file is structured and create an image, from scratch, in which i can say this element goes there, this one here, this text there.
But actually i've no idea how to do this, if the best way is to use a already existing framework in iOS or an additional library?
Thanks to everyone ;)
Bye
The fastest way to visualize elements is, to me, OpenGL ES. You can use mobile GPU to visualize then there is CIImage for managing image.
Take a look at Quartz 2D, the drawing engine used as the main workhorse for 2D graphics on iOS. It gives you all the primitives for drawing shapes, fills, text and other objects you need to render the presentation.
I have been looking for the solution on the web for a long time. Most tutorials are fairly simple about adding shadow to a UIView. I also noticed that if we add a shadow to an UIImageView. The shadow shape could perfectly fit the shape of the content image if the image itself has alpha channel in it. Say for example, if the image is an animal with transparent background, the shadow shape is also the same as that animal (not a rectangle shadow as same as UIImageView frame).
But these are not enough. What I need to do is to add some changes to the shadow so it may have some rotation angle and compressed (squeezed or shift) effect so that looks like the sunlight comes from a certain spot.
To demonstrate what I need, I upload 2 images below, which I captured from the Google Map App created by Apple. You can imagine the Annotation Pin is an image which has the Pin shape, so the shadow is also "pin shaped", but it is not simply "offset" with a CGSize, you can see the top of the shadow is shifted right about 35 degrees and slightly squeezed the height.
When we tap and hold and pin, the shadow is also animated away from the pin, so I believe that such shadow can be made programmably.
The best shadow tutorial I can found so far is http://nachbaur.com/blog/fun-shadow-effects-using-custom-calayer-shadowpaths But unfortunately, that cannot make this effect.
If anyone know the answer or know any better words to search for, please let me know. Thank you.
(Please note that the shape of the image is dynamic in the App, so using any tool like Photoshop to pre-render the shadow is not an option.)
In order to create dynamic effects like this, you have to use Core Graphics. It's incredibly powerful once you know how to use it. Basically you need to set a skew transform on the context, set up a shadow and draw the image. You will probably have to use transparency layers as well.
It doesn't sound like you can use CALayer shadows, since that is meant to solve a specific use-case. The approach Apple takes with the pin marks on the map is to have two separate images that are created ahead of time (e.g. in Photoshop) and they position them within the map relative to a reference point.
If you really do need to do this at run-time, it should still be possible by using either Core Graphics or ImageKit. To get a blurred shadow appearance, you can use the kCICategoryBlur CIFilter. You can then convert the image to grayscale. And to get that compressed look you just need to resize and skew the image.
Once you have two separate images, you can either take the CGImageRef for the shadow image and can set that as the content of another sublayer, or you can add it as a separate view.
If you know what all the shapes are, you could just render a shadow image in Photoshop or something.
I have implemented a scrollview which uses a CATiledLayer. In UIDocumentInteractionController the view shows some kind of checkerboard background while loading its contents. I wonder if there is something similar to UIColor.ScrollViewTexturedBackgroundColor to get this checkerboard? Or do I have to use my own image?
No, there's none in the IOS documentation, unfortunately. Apple uses their custom backgrounds on a lot of apps, and in general you just need to create it and load it with the UIColor.FromPatternImage(UIImage.FromBundle("image")) command.
I am newbie in cocos2D But have developed several view based application.
So what I want to know is:
Is there any alternate ,for animationImages used for animating the images in imageview, in cocos2D?
I want to use the same thing i.e: Animate the images same as any gif file.
Thanks in advance....
Animation in Cocos2D is handled by the CCAnimation class, you can read the documentation here:
http://www.cocos2d-iphone.org/api-ref/latest-stable/interface_c_c_animation.html
There are a number of examples for animating sprites, using a Sprite Sheet, single Images, a Texture Cache, etc.
This is one of my favorite ones:
http://www.raywenderlich.com/1271/how-to-use-animations-and-sprite-sheets-in-cocos2d