MDGroupAvatarView
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.
## ExampleTo 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 MDGroupAvatarView.
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)
Requirements
Installation
MDGroupAvatarView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "MDGroupAvatarView"
Author
dungttm, [email protected]
License
MDGroupAvatarView is available under the MIT license. See the LICENSE file for more info.