// // MWPhoto.h // MWPhotoBrowser // // Created by Michael Waterfall on 17/10/2010. // Copyright 2010 d3i. All rights reserved. // #import #import #import "MWPhotoProtocol.h" // This class models a photo/image and it's caption // If you want to handle photos, caching, decompression // yourself then you can simply ensure your custom data model // conforms to MWPhotoProtocol @class WFCCMessage; @interface MWPhoto : NSObject @property (nonatomic, strong) NSString *caption; @property (nonatomic, strong) NSURL *videoURL; @property (nonatomic) BOOL emptyImage; @property (nonatomic) BOOL isVideo; @property (nonatomic, strong)WFCCMessage* message; + (MWPhoto *)photoWithImage:(UIImage *)image; + (MWPhoto *)photoWithURL:(NSURL *)url; + (MWPhoto *)photoWithAsset:(PHAsset *)asset targetSize:(CGSize)targetSize; + (MWPhoto *)videoWithURL:(NSURL *)url; // Initialise video with no poster image - (id)init; - (id)initWithImage:(UIImage *)image; - (id)initWithURL:(NSURL *)url; - (id)initWithAsset:(PHAsset *)asset targetSize:(CGSize)targetSize; - (id)initWithVideoURL:(NSURL *)url; @end