Skip to content

itlijunjie/QQHeader

Repository files navigation

QQHeader

Version Platform Carthage Compatible build

一个高仿QQ讨论组头像的实现

Preview


Installation

手动添加Classes文件中的类。

CocoaPods

pod 'QQHeader'

Carthage

github "itlijunjie/QQHeader"

原理和使用方法

每个头像可以分为一个个的小头像:
JJCustomLayer就是每个小头像:主要负责头像的裁剪
JJHeaders就是最终的头像:主要负责计算出每个小头像的center
JJHeadersConfig主要负责头像参数的配置,目前只配置了裁剪角度的大小

Objective-C

UIView *view = [JJHeaders createHeaderView:viewWH
                                    images:@[[UIImage imageNamed:@"0"],
                                             [UIImage imageNamed:@"1"],
                                             [UIImage imageNamed:@"2"],
                                             [UIImage imageNamed:@"3"],
                                             [UIImage imageNamed:@"4"]]];

Swift

let view = JJHeaders.createHeaderView(viewWH, images: [
                                                                UIImage(named: "0")!,
                                                                UIImage(named: "1")!,
                                                                UIImage(named: "2")!,
                                                                UIImage(named: "3")!,
                                                                UIImage(named: "4")!
                                                                ])

联系方式

QQ:470058952
我的微信:

License

QQHeader is under WTFPL. You can do what the fuck you want with QQHeader. See LICENSE file for more info.