/DBChatAvatarView

Group avatar for chat

Primary LanguageObjective-CMIT LicenseMIT

DBChatAvatarView

The control, which allow you to create group avatar for chat.

Xcode Platform License

Screenshot

Sample screen

Installation

source 'git@github.com:dibelogrivaya/db-specs.git'
pod "DBChatAvatarView" 

Usage

  • Import DBChatAvatarView.h in your view.
  • Create a new DBChatAvatarView with Storyboards or via code.
DBChatAvatarView *chatAvatarView = [[DBChatAvatarView alloc] initWithFrame:frame];
[self.view addSubview:chatAvatarView];
  • Implement protocol DBChatAvatarViewDataSource
@protocol DBChatAvatarViewDataSource <NSObject>

- (NSInteger)numberOfUsersInChatAvatarView:(DBChatAvatarView *)chatAvatarView;
- (DBChatAvatarState)stateForAvatarAtIndex:(NSInteger)avatarIndex inChatAvatarView:(DBChatAvatarView *)chatAvatarView;
- (UIImage *)imageForAvatarAtIndex:(NSInteger)avatarIndex inChatAvatarView:(DBChatAvatarView *)chatAvatarView;

@end
  • Reload
[chatAvatarView reloadAvatars];