AvatarGroup is a avatars' group view library which can arrange the circle avatars in a stack view.
AvatarGroup is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'AvatarGroup'
The following properties are supported in AvatarGroupView
:
- spacing (
CGFloat
): the space between to avatars. - reverse (
Bool
): reverse the AvatarGroupView. - alignment (
AvatarGroup.Alignment
) - borderColor (
UIColor
) - borderWidth (
CGFloat
)
Update avatar images with the following method:
func setAvatars(images: [UIIamge?])
AvatarGroup supports to load image url with Kingfisher.
pod 'AvatarGroup/Kingfisher'
Update avatar urls with the following methods.
func setAvatars(urls: [URL?])
AvatarGroup supports to load image url with both RxSwift and Kingfisher.
pod 'AvatarGroup/RxKingfisher'
Bind an observable object to the binder urls
of the reactive extension.
viewModel.avatarUrls.bind(to: avatarGroupView.rx.urls).disposed(by: disposeBag)
To run the example project, clone the repo, and run pod install
from the Example directory first.
AvatarGroup is available under the MIT license. See the LICENSE file for more info.