Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: d1398a3334
Fetching contributors…

Cannot retrieve contributors at this time

file 52 lines (38 sloc) 1.5 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
//
// PAPPhotoDetailsHeaderView.h
// Anypic
//
// Created by Mattieu Gamache-Asselin on 5/15/12.
// Copyright (c) 2012 Parse. All rights reserved.
//

@protocol PAPPhotoDetailsHeaderViewDelegate;

@interface PAPPhotoDetailsHeaderView : UIView

/*! @name Managing View Properties */

/// The photo displayed in the view
@property (nonatomic, strong, readonly) PFObject *photo;

/// The user that took the photo
@property (nonatomic, strong, readonly) PFUser *photographer;

/// Array of the users that liked the photo
@property (nonatomic, strong) NSArray *likeUsers;

/// Heart-shaped like button
@property (nonatomic, strong, readonly) UIButton *likeButton;

/*! @name Delegate */
@property (nonatomic, strong) id<PAPPhotoDetailsHeaderViewDelegate> delegate;

+ (CGRect)rectForView;

- (id)initWithFrame:(CGRect)frame photo:(PFObject*)aPhoto;
- (id)initWithFrame:(CGRect)frame photo:(PFObject*)aPhoto photographer:(PFUser*)aPhotographer likeUsers:(NSArray*)theLikeUsers;

- (void)setLikeButtonState:(BOOL)selected;
- (void)reloadLikeBar;
@end

/*!
The protocol defines methods a delegate of a PAPPhotoDetailsHeaderView should implement.
*/
@protocol PAPPhotoDetailsHeaderViewDelegate <NSObject>
@optional

/*!
Sent to the delegate when the photgrapher's name/avatar is tapped
@param button the tapped UIButton
@param user the PFUser for the photograper
*/
- (void)photoDetailsHeaderView:(PAPPhotoDetailsHeaderView *)headerView didTapUserButton:(UIButton *)button user:(PFUser *)user;

@end
Something went wrong with that request. Please try again.