2
0

MWPhoto.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // MWPhoto.h
  3. // MWPhotoBrowser
  4. //
  5. // Created by Michael Waterfall on 17/10/2010.
  6. // Copyright 2010 d3i. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <Photos/Photos.h>
  10. #import "MWPhotoProtocol.h"
  11. // This class models a photo/image and it's caption
  12. // If you want to handle photos, caching, decompression
  13. // yourself then you can simply ensure your custom data model
  14. // conforms to MWPhotoProtocol
  15. @class WFCCMessage;
  16. @interface MWPhoto : NSObject <MWPhoto>
  17. @property (nonatomic, strong) NSString *caption;
  18. @property (nonatomic, strong) NSURL *videoURL;
  19. @property (nonatomic) BOOL emptyImage;
  20. @property (nonatomic) BOOL isVideo;
  21. @property (nonatomic, strong)WFCCMessage* message;
  22. + (MWPhoto *)photoWithImage:(UIImage *)image;
  23. + (MWPhoto *)photoWithURL:(NSURL *)url;
  24. + (MWPhoto *)photoWithAsset:(PHAsset *)asset targetSize:(CGSize)targetSize;
  25. + (MWPhoto *)videoWithURL:(NSURL *)url; // Initialise video with no poster image
  26. - (id)init;
  27. - (id)initWithImage:(UIImage *)image;
  28. - (id)initWithURL:(NSURL *)url;
  29. - (id)initWithAsset:(PHAsset *)asset targetSize:(CGSize)targetSize;
  30. - (id)initWithVideoURL:(NSURL *)url;
  31. @end