MWPhoto.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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 "MWPhotoProtocol.h"
  10. // This class models a photo/image and it's caption
  11. // If you want to handle photos, caching, decompression
  12. // yourself then you can simply ensure your custom data model
  13. // conforms to MWPhotoProtocol
  14. @interface MWPhoto : NSObject <MWPhoto>
  15. @property (nonatomic, strong) NSString *caption;
  16. @property (nonatomic, readonly) UIImage *image;
  17. @property (nonatomic, readonly) NSURL *photoURL;
  18. @property (nonatomic, readonly) NSString *filePath __attribute__((deprecated("Use photoURL"))); // Depreciated
  19. + (MWPhoto *)photoWithImage:(UIImage *)image;
  20. + (MWPhoto *)photoWithFilePath:(NSString *)path __attribute__((deprecated("Use photoWithURL: with a file URL"))); // Depreciated
  21. + (MWPhoto *)photoWithURL:(NSURL *)url;
  22. - (id)initWithImage:(UIImage *)image;
  23. - (id)initWithURL:(NSURL *)url;
  24. - (id)initWithFilePath:(NSString *)path __attribute__((deprecated("Use initWithURL: with a file URL"))); // Depreciated
  25. @end