ViewController.m 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // ViewController.m
  3. // gifImageDemo
  4. //
  5. // Created by LTX on 2017/7/18.
  6. // Copyright © 2017年 LTX. All rights reserved.
  7. //
  8. #import "ViewController.h"
  9. #import "FLAnimatedImageView+WebCache.h"
  10. #import <SDWebImage/UIImageView+WebCache.h>
  11. @interface ViewController ()
  12. @property (weak, nonatomic) IBOutlet FLAnimatedImageView *bigImageView;
  13. @property (strong, nonatomic) UIImageView *imageView;
  14. @end
  15. @implementation ViewController
  16. - (void)viewDidLoad {
  17. [super viewDidLoad];
  18. [self.bigImageView sd_setImageWithURL:[NSURL URLWithString:@"https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif"] placeholderImage:nil];
  19. // [self test2];
  20. }
  21. - (void)test2
  22. { _imageView = [[UIImageView alloc] initWithFrame:CGRectMake(100, 200, 200, 200)];
  23. [self.view addSubview:_imageView];
  24. [_imageView sd_setImageWithURL:[NSURL URLWithString:@"https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif"] placeholderImage:nil];
  25. }
  26. - (void)didReceiveMemoryWarning {
  27. [super didReceiveMemoryWarning];
  28. // Dispose of any resources that can be recreated.
  29. }
  30. @end