Forget about the indexPath, sorry about that.

This commit is contained in:
Kyle Fang
2013-07-25 14:17:32 +08:00
parent 0a40077e23
commit 7d19db35f8
3 changed files with 3 additions and 3 deletions

View File

@@ -64,7 +64,7 @@ typedef enum {
@protocol JSMessagesViewDataSource <NSObject>
@optional
- (NSDate *)timestampForRowAtIndexPath:(NSIndexPath *)indexPath;
- (void)goCrazyWithYourAvatarImageView:(UIImageView *)avatarView;
- (void)goCrazyWithYourAvatarImageView:(UIImageView *)avatarView forRowAtIndexPath:(NSIndexPath *)indexPath;
@required
- (NSString *)textForRowAtIndexPath:(NSIndexPath *)indexPath;
@end

View File

@@ -187,7 +187,7 @@
[cell setTimestamp:[self.dataSource timestampForRowAtIndexPath:indexPath]];
if (hasAvatar) {
[self.dataSource goCrazyWithYourAvatarImageView:cell.photoView];
[self.dataSource goCrazyWithYourAvatarImageView:cell.photoView forRowAtIndexPath:indexPath];
}
[cell setMessage:[self.dataSource textForRowAtIndexPath:indexPath]];

View File

@@ -119,7 +119,7 @@
return [self.timestamps objectAtIndex:indexPath.row];
}
- (void)goCrazyWithYourAvatarImageView:(UIImageView *)avatarView{
- (void)goCrazyWithYourAvatarImageView:(UIImageView *)avatarView forRowAtIndexPath:(NSIndexPath *)indexPath{
avatarView.image = [UIImage imageNamed:@"DemoAvatarExample"];
}