mirror of
https://github.com/zhigang1992/MessagesTableViewController.git
synced 2026-01-12 22:48:53 +08:00
Forget about the indexPath, sorry about that.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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]];
|
||||
|
||||
@@ -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"];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user