• Stars
    star
    125
  • Rank 286,335 (Top 6 %)
  • Language
    Swift
  • License
    MIT License
  • Created over 8 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

MDGroupAvatarView cocoapod

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.

CI Status Version License Platform

Β 
## Example

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 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.

More Repositories