MDGroupAvatarView 0.0.4

MDGroupAvatarView 0.0.4

LangLanguage SwiftSwift
License MIT
ReleasedLast Release Aug 2016
SPMSupports SPM

Maintained by Dung Tran.

  • By
  • ttmdung203


This library provides a custom UIView with support for showing group of avatars. It’s used for group chat. The images list can be loaded from local or web url.



To run the example project, clone the repo, and run pod install from the Example directory first.

Drag UIView to storyboard or xib file. Then assign class of this view is UIGroupAvatarView.

NOTE: localGroupAvatarView and urlGroupAvatarView in this example are two properties connected to Storyboard.

Local Images

        var images = Array<UIImage>()
        images.append(UIImage(named: "img_avatar_01") ?? UIImage())
        images.append(UIImage(named: "img_avatar_02") ?? UIImage())
        images.append(UIImage(named: "img_avatar_03") ?? UIImage())
        localGroupAvatarView.setAvatarImages(images, realTotal: NUM_OF_MEMBER)

Images loaded from url

        var urls = Array<NSURL>()
        urls.append(NSURL(string: "https://img_url01.jpg")!)
        urls.append(NSURL(string: "https://img_url02.jpg")!)
        urls.append(NSURL(string: "https://img_url03.jpg")!)
        urls.append(NSURL(string: "https://img_url04.jpg")!)
        urlGroupAvatarView.setAvatarUrl(urls, realTotal: NUM_OF_MEMBER)



MDGroupAvatarView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "MDGroupAvatarView"


dungttm, [email protected]


MDGroupAvatarView is available under the MIT license. See the LICENSE file for more info.