The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex
If you have a serie of images you want to animate you can easily do it with UIImageView:
ReplyDeleteUIImage *blur5 = [UIImage imageNamed:@"blur5.png"];
UIImage *blur6 = [UIImage imageNamed:@"blur6.png"];
self.imageView.animationImages = [[NSArray alloc] initWithObjects:blur5, blur6, nil];
self.imageView.animationRepeatCount = 5;
[self.imageView startAnimating];
I found this easier than trying to use UIWebView.
UIWebView does not properly display all GIF content. You need to use a UIImageView, but the iPhone OS does not support animated GIFS and only displays the first frame.
ReplyDeleteSo you need to extract all of the other frames first.
Crude example code here:
http://pliep.nl/blog/2009/04/iphone_developer_decoding_an_animated_gif_image_in_objc
You can use source at http://blog.stijnspijker.nl/2009/07/animated-and-transparent-gifs-for-iphone-made-easy/
ReplyDeleteIt has a GIF decoder that you can use directly to get solution.
I successfully used it. But it have some problems with transparency.
Excellent article on 'Animating gif and animating images'
ReplyDeletehttp://iphonedevelopertips.com/graphics/animated-gif-animated-images-iphone-style.html
one other option is to decode the gif in your application and then "frame serve" it to a opengl object, this way is less likely to run out of memory for large gifs
ReplyDelete