DetailViewController.m 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * This file is part of the SDWebImage package.
  3. * (c) Olivier Poitrey <rs@dailymotion.com>
  4. *
  5. * For the full copyright and license information, please view the LICENSE
  6. * file that was distributed with this source code.
  7. */
  8. #import "DetailViewController.h"
  9. #import <SDWebImage/UIView+WebCache.h>
  10. #import <SDWebImage/SDAnimatedImageView+WebCache.h>
  11. @interface DetailViewController ()
  12. @property (strong, nonatomic) IBOutlet SDAnimatedImageView *imageView;
  13. @end
  14. @implementation DetailViewController
  15. - (void)configureView
  16. {
  17. if (!self.imageView.sd_imageIndicator) {
  18. self.imageView.sd_imageIndicator = SDWebImageProgressIndicator.defaultIndicator;
  19. }
  20. [self.imageView sd_setImageWithURL:self.imageURL
  21. placeholderImage:nil
  22. options:SDWebImageProgressiveDownload];
  23. }
  24. - (void)viewDidLoad
  25. {
  26. [super viewDidLoad];
  27. [self configureView];
  28. }
  29. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
  30. {
  31. return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
  32. }
  33. @end