-
Notifications
You must be signed in to change notification settings - Fork 0
/
BoardDetailsHeaderView.h
55 lines (40 loc) · 1.52 KB
/
BoardDetailsHeaderView.h
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
53
54
55
//
// BoardDetailsHeaderView.h
// SeoulMate
//
// Created by Hassan Abid on 7/11/15.
//
//
@protocol BoardDetailsHeaderViewDelegate;
@interface BoardDetailsHeaderView : UIView
/*! @name Managing View Properties */
/// The board displayed in the view
@property (nonatomic, strong, readonly) PFObject *photo;
/// The user that write the board post
@property (nonatomic, strong, readonly) PFUser *writer;
/// 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<BoardDetailsHeaderViewDelegate> delegate;
+ (CGRect)rectForView;
+ (CGRect)rectForViewWithoutImage;
- (id)initWithFrame:(CGRect)frame photo:(PFObject*)aPhoto;
- (id)initWithFrame:(CGRect)frame photo:(PFObject*)aPhoto writer:(PFUser*)aWriter likeUsers:(NSArray*)theLikeUsers;
- (void)setLikeButtonState:(BOOL)selected;
- (void)reloadLikeBar;
@end
/*!
The protocol defines methods a delegate of a PAPPhotoDetailsHeaderView should implement.
*/
@protocol BoardDetailsHeaderViewDelegate <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)boardDetailsHeaderView:(BoardDetailsHeaderView *)headerView didTapUserButton:(UIButton *)button user:(PFUser *)user;
- (void)boardDetailsHeaderView:(BoardDetailsHeaderView *)headerView didTapReadMoreButton:(UIButton *)button;
@end