DBChatAvatarView icon indicating copy to clipboard operation
DBChatAvatarView copied to clipboard

Group avatar for chat

DBChatAvatarView

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

Xcode Platform License

Screenshot

Sample screen

Installation

source '[email protected]: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];