Animated GIF alternative for iOS

后端 未结 4 566
遇见更好的自我
遇见更好的自我 2021-02-06 13:51

\"Back in the day\" animated GIFs were ubiquitous online.

They were simple to use - just pop em\' in wherever you want an animated image.

I\'d like to display a

相关标签:
4条回答
  • 2021-02-06 14:02

    Flipboard just released their GIF library which is very performant and is used by several popular apps like Flipboard, Dropbox, Medium etc:

    https://github.com/Flipboard/FLAnimatedImage

    0 讨论(0)
  • 2021-02-06 14:02

    You can use UIWebView to load html Page with in Bundle. GO TO File > New>Others > Empty > Enter File Name with Extension

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta charset="utf-8">
         <title>QUALITY PLACEMENTS</title>
    
    </head>
    <body>
    <div style="word-wrap: break-word !important; width: 300px;">
        <img width="100%" src="Surprice-0.gif"/>
       </div></body></html> 
        //IOS CODE 
         UIWebView* mywebview=[[UIWebView alloc]initWithFrame:CGRectMake(5, 50, 300, 300)];
                mywebview.scalesPageToFit = NO;
                mywebview.scrollView.hidden = NO;
                [mywebview setMultipleTouchEnabled:YES];
                NSURL* url=[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"greeting" ofType:@"html"]];
                [mywebview loadRequest:[NSURLRequest requestWithURL:url]];
    
    0 讨论(0)
  • 2021-02-06 14:07

    Here is a tutorial on animating UIImage in the iPhone SDK:

    http://www.icodeblog.com/2009/07/24/iphone-programming-tutorial-animating-a-game-sprite/

    0 讨论(0)
  • 2021-02-06 14:08

    For future references, Eric's answer here is a better way to do it since it uses modern ImageIO.framework and is also available as a category on UIImageView.

    0 讨论(0)
提交回复
热议问题