2
0

MWCaptionView.h 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // MWCaptionView.h
  3. // MWPhotoBrowser
  4. //
  5. // Created by Michael Waterfall on 30/12/2011.
  6. // Copyright (c) 2011 __MyCompanyName__. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "MWPhotoProtocol.h"
  10. @interface MWCaptionView : UIToolbar
  11. // Init
  12. - (id)initWithPhoto:(id<MWPhoto>)photo;
  13. // To create your own custom caption view, subclass this view
  14. // and override the following two methods (as well as any other
  15. // UIView methods that you see fit):
  16. // Override -setupCaption so setup your subviews and customise the appearance
  17. // of your custom caption
  18. // You can access the photo's data by accessing the _photo ivar
  19. // If you need more data per photo then simply subclass MWPhoto and return your
  20. // subclass to the photo browsers -photoBrowser:photoAtIndex: delegate method
  21. - (void)setupCaption;
  22. // Override -sizeThatFits: and return a CGSize specifying the height of your
  23. // custom caption view. With width property is ignored and the caption is displayed
  24. // the full width of the screen
  25. - (CGSize)sizeThatFits:(CGSize)size;
  26. @end