一键匹配增加头像
This commit is contained in:
22
xplan-ios/Assets.xcassets/Home/home_match_avatar1.imageset/Contents.json
vendored
Normal file
22
xplan-ios/Assets.xcassets/Home/home_match_avatar1.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_match_avatar1@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_match_avatar1@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Home/home_match_avatar1.imageset/home_match_avatar1@2x.png
vendored
Normal file
BIN
xplan-ios/Assets.xcassets/Home/home_match_avatar1.imageset/home_match_avatar1@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
BIN
xplan-ios/Assets.xcassets/Home/home_match_avatar1.imageset/home_match_avatar1@3x.png
vendored
Normal file
BIN
xplan-ios/Assets.xcassets/Home/home_match_avatar1.imageset/home_match_avatar1@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.0 KiB |
22
xplan-ios/Assets.xcassets/Home/home_match_avatar2.imageset/Contents.json
vendored
Normal file
22
xplan-ios/Assets.xcassets/Home/home_match_avatar2.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_match_avatar2@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_match_avatar2@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Home/home_match_avatar2.imageset/home_match_avatar2@2x.png
vendored
Normal file
BIN
xplan-ios/Assets.xcassets/Home/home_match_avatar2.imageset/home_match_avatar2@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
BIN
xplan-ios/Assets.xcassets/Home/home_match_avatar2.imageset/home_match_avatar2@3x.png
vendored
Normal file
BIN
xplan-ios/Assets.xcassets/Home/home_match_avatar2.imageset/home_match_avatar2@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
22
xplan-ios/Assets.xcassets/Home/home_match_avatar3.imageset/Contents.json
vendored
Normal file
22
xplan-ios/Assets.xcassets/Home/home_match_avatar3.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_match_avatar3@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_match_avatar3@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Home/home_match_avatar3.imageset/home_match_avatar3@2x.png
vendored
Normal file
BIN
xplan-ios/Assets.xcassets/Home/home_match_avatar3.imageset/home_match_avatar3@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.6 KiB |
BIN
xplan-ios/Assets.xcassets/Home/home_match_avatar3.imageset/home_match_avatar3@3x.png
vendored
Normal file
BIN
xplan-ios/Assets.xcassets/Home/home_match_avatar3.imageset/home_match_avatar3@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.3 KiB |
@@ -15,6 +15,7 @@
|
||||
#import "ThemeColor.h"
|
||||
#import "UIImage+Utils.h"
|
||||
#import "XPCycleVerticalView.h"
|
||||
#import "NetImageView.h"
|
||||
///Model
|
||||
#import "XPHomeGiftRecordModel.h"
|
||||
#import "HomeMenuInfoModel.h"
|
||||
@@ -33,6 +34,9 @@
|
||||
@property (nonatomic, strong) UIImageView *greenDot;
|
||||
/// 在线人数
|
||||
@property (nonatomic, strong) UILabel *onlineNumLabel;
|
||||
@property (nonatomic, strong) NetImageView *matchAvatar1;
|
||||
@property (nonatomic, strong) NetImageView *matchAvatar2;
|
||||
@property (nonatomic, strong) NetImageView *matchAvatar3;
|
||||
|
||||
/// 热门
|
||||
@property (nonatomic, strong) UIImageView *hotView;
|
||||
@@ -63,6 +67,9 @@
|
||||
[self addSubview:self.matchView];
|
||||
[self.matchView addSubview:self.greenDot];
|
||||
[self.matchView addSubview:self.onlineNumLabel];
|
||||
[self.matchView addSubview:self.matchAvatar1];
|
||||
[self.matchView addSubview:self.matchAvatar2];
|
||||
[self.matchView addSubview:self.matchAvatar3];
|
||||
[self addSubview:self.hotView];
|
||||
[self.hotView addSubview:self.hotTextImageView];
|
||||
[self.hotView addSubview:self.messageView];
|
||||
@@ -126,6 +133,24 @@
|
||||
make.size.mas_equalTo(CGSizeMake(4, 4));
|
||||
}];
|
||||
|
||||
[self.matchAvatar3 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(-11);
|
||||
make.centerY.mas_equalTo(8);
|
||||
make.width.height.mas_equalTo(22);
|
||||
}];
|
||||
|
||||
[self.matchAvatar2 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(self.matchAvatar3.mas_left).offset(-8);
|
||||
make.centerY.mas_equalTo(0);
|
||||
make.width.height.mas_equalTo(36);
|
||||
}];
|
||||
|
||||
[self.matchAvatar1 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(self.matchAvatar2.mas_left).offset(-8);
|
||||
make.centerY.mas_equalTo(self.matchAvatar3);
|
||||
make.width.height.mas_equalTo(self.matchAvatar3);
|
||||
}];
|
||||
|
||||
CGFloat hotHeight = 72.0*kScreenScale;
|
||||
[self.hotView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(15);
|
||||
@@ -291,6 +316,39 @@
|
||||
return _onlineNumLabel;
|
||||
}
|
||||
|
||||
- (NetImageView *)matchAvatar1 {
|
||||
if (!_matchAvatar1) {
|
||||
_matchAvatar1 = [[NetImageView alloc] init];
|
||||
_matchAvatar1.clipsToBounds = YES;
|
||||
_matchAvatar1.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_matchAvatar1.image = [UIImage imageNamed:@"home_match_avatar1"];
|
||||
_matchAvatar1.layer.cornerRadius = 11;
|
||||
}
|
||||
return _matchAvatar1;
|
||||
}
|
||||
|
||||
- (NetImageView *)matchAvatar2 {
|
||||
if (!_matchAvatar2) {
|
||||
_matchAvatar2 = [[NetImageView alloc] init];
|
||||
_matchAvatar2.clipsToBounds = YES;
|
||||
_matchAvatar2.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_matchAvatar2.image = [UIImage imageNamed:@"home_match_avatar2"];
|
||||
_matchAvatar2.layer.cornerRadius = 18;
|
||||
}
|
||||
return _matchAvatar2;
|
||||
}
|
||||
|
||||
- (NetImageView *)matchAvatar3 {
|
||||
if (!_matchAvatar3) {
|
||||
_matchAvatar3 = [[NetImageView alloc] init];
|
||||
_matchAvatar3.clipsToBounds = YES;
|
||||
_matchAvatar3.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_matchAvatar3.image = [UIImage imageNamed:@"home_match_avatar3"];
|
||||
_matchAvatar3.layer.cornerRadius = 11;
|
||||
}
|
||||
return _matchAvatar3;
|
||||
}
|
||||
|
||||
- (UIImageView *)hotView {
|
||||
if (!_hotView) {
|
||||
_hotView = [[UIImageView alloc] init];
|
||||
|
Reference in New Issue
Block a user