DetailViewController.m 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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/SDWebImage.h>
  10. @interface DetailViewController ()
  11. @property (strong, nonatomic) IBOutlet SDAnimatedImageView *imageView;
  12. @end
  13. @implementation DetailViewController
  14. - (void)configureView
  15. {
  16. if (!self.imageView.sd_imageIndicator) {
  17. self.imageView.sd_imageIndicator = SDWebImageProgressIndicator.defaultIndicator;
  18. }
  19. [self.imageView sd_setImageWithURL:self.imageURL
  20. placeholderImage:nil
  21. options:SDWebImageProgressiveLoad];
  22. }
  23. - (void)viewDidLoad
  24. {
  25. [super viewDidLoad];
  26. [self configureView];
  27. }
  28. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
  29. {
  30. return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
  31. }
  32. @end