交友房初步完成
This commit is contained in:
@@ -6,7 +6,12 @@
|
||||
//
|
||||
|
||||
#import "QXRankTopThreeView.h"
|
||||
|
||||
#import "QXUserHomePageViewController.h"
|
||||
@interface QXRankTopThreeView()
|
||||
@property (nonatomic,strong)QXMyRankModel *firstModel;
|
||||
@property (nonatomic,strong)QXMyRankModel *secondModel;
|
||||
@property (nonatomic,strong)QXMyRankModel *thirdModel;
|
||||
@end
|
||||
@implementation QXRankTopThreeView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
@@ -14,6 +19,31 @@
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
self = [[[NSBundle mainBundle]loadNibNamed:@"QXRankTopThreeView" owner:nil options:nil] lastObject];
|
||||
MJWeakSelf
|
||||
[self.firstHeaderImage addTapBlock:^(id _Nonnull obj) {
|
||||
if ([self.firstModel.user_id isExist]) {
|
||||
QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];
|
||||
vc.user_id = self.firstModel.user_id;
|
||||
[weakSelf.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
return;
|
||||
}];
|
||||
[self.secondHeaderImage addTapBlock:^(id _Nonnull obj) {
|
||||
if ([self.secondModel.user_id isExist]) {
|
||||
QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];
|
||||
vc.user_id = self.secondModel.user_id;
|
||||
[weakSelf.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
return;
|
||||
}];
|
||||
[self.thirdHeaderImage addTapBlock:^(id _Nonnull obj) {
|
||||
if ([self.thirdModel.user_id isExist]) {
|
||||
QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];
|
||||
vc.user_id = self.thirdModel.user_id;
|
||||
[weakSelf.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
return;
|
||||
}];
|
||||
self.frame = frame;
|
||||
}
|
||||
return self;
|
||||
@@ -59,6 +89,9 @@
|
||||
self.thirdRankValueLabel.text = [NSString qx_showHotCountNum:thirdModel.total.longLongValue];
|
||||
self.thirdRankValueLabel.adjustsFontSizeToFitWidth = YES;
|
||||
}
|
||||
self.firstModel = firstModel;
|
||||
self.secondModel = secondModel;
|
||||
self.thirdModel = thirdModel;
|
||||
}
|
||||
-(void)resetView{
|
||||
self.firstHeaderImage.image = [UIImage imageNamed:@"user_header_placehoulder"];
|
||||
@@ -113,6 +146,9 @@
|
||||
self.thirdRankValueLabel.text = [NSString qx_showHotCountNum:thirdModel.total.longLongValue];
|
||||
self.thirdRankValueLabel.adjustsFontSizeToFitWidth = YES;
|
||||
}
|
||||
self.firstModel = firstModel;
|
||||
self.secondModel = secondModel;
|
||||
self.thirdModel = thirdModel;
|
||||
}
|
||||
-(void)setGuildList:(NSArray<QXMyRankModel *> *)guildList{
|
||||
_guildList = guildList;
|
||||
|
||||
Reference in New Issue
Block a user