完善个人资料页功能
This commit is contained in:
@@ -533,6 +533,7 @@
|
|||||||
54F469382C29C3B400A83655 /* XPMineAlbumTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 54F469372C29C3B400A83655 /* XPMineAlbumTableViewCell.m */; };
|
54F469382C29C3B400A83655 /* XPMineAlbumTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 54F469372C29C3B400A83655 /* XPMineAlbumTableViewCell.m */; };
|
||||||
54F4693B2C2A984D00A83655 /* MedalModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 54F4693A2C2A984D00A83655 /* MedalModel.m */; };
|
54F4693B2C2A984D00A83655 /* MedalModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 54F4693A2C2A984D00A83655 /* MedalModel.m */; };
|
||||||
54F4693E2C2A9D4E00A83655 /* XPMineMedalsTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 54F4693D2C2A9D4E00A83655 /* XPMineMedalsTableViewCell.m */; };
|
54F4693E2C2A9D4E00A83655 /* XPMineMedalsTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 54F4693D2C2A9D4E00A83655 /* XPMineMedalsTableViewCell.m */; };
|
||||||
|
54F469412C2AB56900A83655 /* XPMineGiftsTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 54F469402C2AB56900A83655 /* XPMineGiftsTableViewCell.m */; };
|
||||||
73FFADDC93E195344047A2EC /* Pods_YuMi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CACF623970097D653132D69A /* Pods_YuMi.framework */; };
|
73FFADDC93E195344047A2EC /* Pods_YuMi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CACF623970097D653132D69A /* Pods_YuMi.framework */; };
|
||||||
9B0086C627BA392B0032BD2B /* AnchorStageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B0086C527BA392B0032BD2B /* AnchorStageView.m */; };
|
9B0086C627BA392B0032BD2B /* AnchorStageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B0086C527BA392B0032BD2B /* AnchorStageView.m */; };
|
||||||
9B0086CA27BA4F570032BD2B /* AnchorMicroView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B0086C927BA4F570032BD2B /* AnchorMicroView.m */; };
|
9B0086CA27BA4F570032BD2B /* AnchorMicroView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B0086C927BA4F570032BD2B /* AnchorMicroView.m */; };
|
||||||
@@ -2597,6 +2598,8 @@
|
|||||||
54F4693A2C2A984D00A83655 /* MedalModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MedalModel.m; sourceTree = "<group>"; };
|
54F4693A2C2A984D00A83655 /* MedalModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MedalModel.m; sourceTree = "<group>"; };
|
||||||
54F4693C2C2A9D4E00A83655 /* XPMineMedalsTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineMedalsTableViewCell.h; sourceTree = "<group>"; };
|
54F4693C2C2A9D4E00A83655 /* XPMineMedalsTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineMedalsTableViewCell.h; sourceTree = "<group>"; };
|
||||||
54F4693D2C2A9D4E00A83655 /* XPMineMedalsTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineMedalsTableViewCell.m; sourceTree = "<group>"; };
|
54F4693D2C2A9D4E00A83655 /* XPMineMedalsTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineMedalsTableViewCell.m; sourceTree = "<group>"; };
|
||||||
|
54F4693F2C2AB56900A83655 /* XPMineGiftsTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineGiftsTableViewCell.h; sourceTree = "<group>"; };
|
||||||
|
54F469402C2AB56900A83655 /* XPMineGiftsTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineGiftsTableViewCell.m; sourceTree = "<group>"; };
|
||||||
7DB00EC07F1D0ADFF900B38D /* Pods-YuMi.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YuMi.debug.xcconfig"; path = "Target Support Files/Pods-YuMi/Pods-YuMi.debug.xcconfig"; sourceTree = "<group>"; };
|
7DB00EC07F1D0ADFF900B38D /* Pods-YuMi.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YuMi.debug.xcconfig"; path = "Target Support Files/Pods-YuMi/Pods-YuMi.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
9B0086C427BA392B0032BD2B /* AnchorStageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnchorStageView.h; sourceTree = "<group>"; };
|
9B0086C427BA392B0032BD2B /* AnchorStageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnchorStageView.h; sourceTree = "<group>"; };
|
||||||
9B0086C527BA392B0032BD2B /* AnchorStageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AnchorStageView.m; sourceTree = "<group>"; };
|
9B0086C527BA392B0032BD2B /* AnchorStageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AnchorStageView.m; sourceTree = "<group>"; };
|
||||||
@@ -10975,6 +10978,8 @@
|
|||||||
54F469372C29C3B400A83655 /* XPMineAlbumTableViewCell.m */,
|
54F469372C29C3B400A83655 /* XPMineAlbumTableViewCell.m */,
|
||||||
54F4693C2C2A9D4E00A83655 /* XPMineMedalsTableViewCell.h */,
|
54F4693C2C2A9D4E00A83655 /* XPMineMedalsTableViewCell.h */,
|
||||||
54F4693D2C2A9D4E00A83655 /* XPMineMedalsTableViewCell.m */,
|
54F4693D2C2A9D4E00A83655 /* XPMineMedalsTableViewCell.m */,
|
||||||
|
54F4693F2C2AB56900A83655 /* XPMineGiftsTableViewCell.h */,
|
||||||
|
54F469402C2AB56900A83655 /* XPMineGiftsTableViewCell.m */,
|
||||||
E8D34D4E28080362009C4835 /* XPMineDataGiftTableViewCell.h */,
|
E8D34D4E28080362009C4835 /* XPMineDataGiftTableViewCell.h */,
|
||||||
E8D34D4F28080362009C4835 /* XPMineDataGiftTableViewCell.m */,
|
E8D34D4F28080362009C4835 /* XPMineDataGiftTableViewCell.m */,
|
||||||
E8D34D5428080393009C4835 /* XPMineDataGiftCollectionViewCell.h */,
|
E8D34D5428080393009C4835 /* XPMineDataGiftCollectionViewCell.h */,
|
||||||
@@ -12131,6 +12136,7 @@
|
|||||||
E84150C527747E0900A7F548 /* FirstRechargeRewardModel.m in Sources */,
|
E84150C527747E0900A7F548 /* FirstRechargeRewardModel.m in Sources */,
|
||||||
E8B9843328ABA2FF0022D026 /* MonentsPicResInfo.m in Sources */,
|
E8B9843328ABA2FF0022D026 /* MonentsPicResInfo.m in Sources */,
|
||||||
239D0FDB2C047F24002977CE /* MSTabbarRoomGameCell.m in Sources */,
|
239D0FDB2C047F24002977CE /* MSTabbarRoomGameCell.m in Sources */,
|
||||||
|
54F469412C2AB56900A83655 /* XPMineGiftsTableViewCell.m in Sources */,
|
||||||
239D0FB02BFD8C4D002977CE /* MSRoomSetingBackdropVC.m in Sources */,
|
239D0FB02BFD8C4D002977CE /* MSRoomSetingBackdropVC.m in Sources */,
|
||||||
235714982BEDF54E004C81D6 /* MsRoomMessageMainView.m in Sources */,
|
235714982BEDF54E004C81D6 /* MsRoomMessageMainView.m in Sources */,
|
||||||
237852A72C08764B00E360AC /* MSRoomGameResultsModel.m in Sources */,
|
237852A72C08764B00E360AC /* MSRoomGameResultsModel.m in Sources */,
|
||||||
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"images" : [
|
||||||
{
|
{
|
||||||
"filename" : "1024ï¼1024.png",
|
"filename" : "1024ï¼1024 1.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"platform" : "ios",
|
"platform" : "ios",
|
||||||
"size" : "1024x1024"
|
"size" : "1024x1024"
|
||||||
|
6
YuMi/Assets.xcassets/MineInfo/Contents.json
Normal file
6
YuMi/Assets.xcassets/MineInfo/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
22
YuMi/Assets.xcassets/mine_gift_bg.imageset/Contents.json
vendored
Normal file
22
YuMi/Assets.xcassets/mine_gift_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "mine_gift_bg@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "mine_gift_bg@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
YuMi/Assets.xcassets/mine_gift_bg.imageset/mine_gift_bg@2x.png
vendored
Normal file
BIN
YuMi/Assets.xcassets/mine_gift_bg.imageset/mine_gift_bg@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
BIN
YuMi/Assets.xcassets/mine_gift_bg.imageset/mine_gift_bg@3x.png
vendored
Normal file
BIN
YuMi/Assets.xcassets/mine_gift_bg.imageset/mine_gift_bg@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
22
YuMi/Assets.xcassets/mine_lucky_gift_bg.imageset/Contents.json
vendored
Normal file
22
YuMi/Assets.xcassets/mine_lucky_gift_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "mine_lucky_gift_bg@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "mine_lucky_gift_bg@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
YuMi/Assets.xcassets/mine_lucky_gift_bg.imageset/mine_lucky_gift_bg@2x.png
vendored
Normal file
BIN
YuMi/Assets.xcassets/mine_lucky_gift_bg.imageset/mine_lucky_gift_bg@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
BIN
YuMi/Assets.xcassets/mine_lucky_gift_bg.imageset/mine_lucky_gift_bg@3x.png
vendored
Normal file
BIN
YuMi/Assets.xcassets/mine_lucky_gift_bg.imageset/mine_lucky_gift_bg@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 58 KiB |
@@ -82,7 +82,8 @@
|
|||||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
XPMineAlbumCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Album Cell"
|
XPMineAlbumCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Album Cell"
|
||||||
forIndexPath:indexPath];
|
forIndexPath:indexPath];
|
||||||
for (UserPhoto *photo in self.albumDataSource) {
|
UserPhoto *photo = [self.albumDataSource xpSafeObjectAtIndex:indexPath.row];
|
||||||
|
if (photo) {
|
||||||
cell.imageView.imageUrl = photo.photoUrl;
|
cell.imageView.imageUrl = photo.photoUrl;
|
||||||
}
|
}
|
||||||
return cell;
|
return cell;
|
||||||
|
@@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// XPMineGiftsTableViewCell.h
|
||||||
|
// YuMi
|
||||||
|
//
|
||||||
|
// Created by P on 2024/6/25.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XPMineGiftsTableViewCell : UITableViewCell
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSArray *giftsDataSource;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,181 @@
|
|||||||
|
//
|
||||||
|
// XPMineGiftsTableViewCell.m
|
||||||
|
// YuMi
|
||||||
|
//
|
||||||
|
// Created by P on 2024/6/25.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XPMineGiftsTableViewCell.h"
|
||||||
|
#import "UserGiftWallInfoModel.h"
|
||||||
|
|
||||||
|
@interface XPMineGiftCell : UICollectionViewCell
|
||||||
|
|
||||||
|
@property (nonatomic, strong) UIImageView *backgroundImageView;
|
||||||
|
@property (nonatomic, strong) NetImageView *imageView;
|
||||||
|
@property (nonatomic, strong) UILabel *titleLabel;
|
||||||
|
@property (nonatomic, strong) UILabel *countLabel;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation XPMineGiftCell
|
||||||
|
|
||||||
|
- (instancetype)initWithFrame:(CGRect)frame {
|
||||||
|
self = [super initWithFrame:frame];
|
||||||
|
if (self) {
|
||||||
|
[self.contentView addSubview:self.backgroundImageView];
|
||||||
|
[self.backgroundImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.edges.mas_equalTo(self.contentView);
|
||||||
|
}];
|
||||||
|
|
||||||
|
[self.contentView addSubview:self.imageView];
|
||||||
|
[self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.centerX.mas_equalTo(self.contentView);
|
||||||
|
make.top.mas_equalTo(12);
|
||||||
|
make.size.mas_equalTo(CGSizeMake(60, 60));
|
||||||
|
}];
|
||||||
|
|
||||||
|
[self.contentView addSubview:self.titleLabel];
|
||||||
|
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.centerX.mas_equalTo(self.contentView);
|
||||||
|
make.top.mas_equalTo(self.imageView.mas_bottom).offset(10);
|
||||||
|
}];
|
||||||
|
|
||||||
|
[self.contentView addSubview:self.countLabel];
|
||||||
|
[self.countLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.centerX.mas_equalTo(self.contentView);
|
||||||
|
make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(6);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (UIImageView *)backgroundImageView {
|
||||||
|
if (!_backgroundImageView) {
|
||||||
|
_backgroundImageView = [[UIImageView alloc] init];
|
||||||
|
_backgroundImageView.image = [UIImage imageNamed:@"mine_gift_bg"];
|
||||||
|
}
|
||||||
|
return _backgroundImageView;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NetImageView *)imageView {
|
||||||
|
if (!_imageView) {
|
||||||
|
NetImageConfig * config = [[NetImageConfig alloc]init];
|
||||||
|
config.imageType = ImageTypeUserIcon;
|
||||||
|
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||||
|
_imageView = [[NetImageView alloc] initWithConfig:config];
|
||||||
|
_imageView.layer.masksToBounds = YES;
|
||||||
|
}
|
||||||
|
return _imageView;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (UILabel *)titleLabel {
|
||||||
|
if (!_titleLabel) {
|
||||||
|
_titleLabel = [UILabel labelInitWithText:@""
|
||||||
|
font:[UIFont systemFontOfSize:11 weight:UIFontWeightMedium]
|
||||||
|
textColor:UIColorFromRGB(0x515860)];
|
||||||
|
}
|
||||||
|
return _titleLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (UILabel *)countLabel {
|
||||||
|
if (!_countLabel) {
|
||||||
|
_countLabel = [UILabel labelInitWithText:@""
|
||||||
|
font:[UIFont systemFontOfSize:11 weight:UIFontWeightRegular]
|
||||||
|
textColor:UIColorFromRGB(0x515860)];
|
||||||
|
_countLabel.alpha = 0.6f;
|
||||||
|
}
|
||||||
|
return _countLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@interface XPMineGiftsTableViewCell()<UICollectionViewDelegateFlowLayout, UICollectionViewDataSource>
|
||||||
|
|
||||||
|
@property (nonatomic, strong) UICollectionView *giftsCollectionView;
|
||||||
|
@property (nonatomic, strong) UILabel *noDataLabel;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation XPMineGiftsTableViewCell
|
||||||
|
|
||||||
|
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||||
|
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||||
|
self.contentView.backgroundColor = [UIColor whiteColor];
|
||||||
|
[self.contentView addSubview:self.giftsCollectionView];
|
||||||
|
[self.giftsCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.mas_equalTo(self.contentView).offset(14);
|
||||||
|
make.edges.mas_equalTo(self.contentView);
|
||||||
|
}];
|
||||||
|
|
||||||
|
[self.contentView addSubview:self.noDataLabel];
|
||||||
|
[self.noDataLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.center.mas_equalTo(self.contentView);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||||
|
[super setSelected:selected animated:animated];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setGiftsDataSource:(NSArray *)giftsDataSource {
|
||||||
|
_giftsDataSource = giftsDataSource;
|
||||||
|
self.noDataLabel.hidden = giftsDataSource.count > 0;
|
||||||
|
[self.giftsCollectionView reloadData];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - UICollectionViewDataSource
|
||||||
|
|
||||||
|
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||||
|
return self.giftsDataSource.count;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
|
XPMineGiftCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Gift Cell"
|
||||||
|
forIndexPath:indexPath];
|
||||||
|
UserGiftWallInfoModel *giftModel = [self.giftsDataSource xpSafeObjectAtIndex:indexPath.row];
|
||||||
|
if (giftModel) {
|
||||||
|
cell.imageView.imageUrl = giftModel.picUrl;
|
||||||
|
cell.titleLabel.text = giftModel.giftName;
|
||||||
|
cell.countLabel.text = [NSString stringWithFormat:@"x%ld", (long)giftModel.reciveCount];
|
||||||
|
}
|
||||||
|
return cell;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - UICollectionViewDelegateFlowLayout
|
||||||
|
|
||||||
|
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
|
return CGSizeMake(86, 120);
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark -
|
||||||
|
- (UICollectionView *)giftsCollectionView {
|
||||||
|
if (!_giftsCollectionView) {
|
||||||
|
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||||
|
layout.scrollDirection = UICollectionViewScrollDirectionVertical;
|
||||||
|
layout.minimumInteritemSpacing = 10;
|
||||||
|
layout.minimumLineSpacing = 10;
|
||||||
|
_giftsCollectionView = [[UICollectionView alloc] initWithFrame:CGRectZero
|
||||||
|
collectionViewLayout:layout];
|
||||||
|
_giftsCollectionView.backgroundColor = [UIColor clearColor];
|
||||||
|
_giftsCollectionView.delegate = self;
|
||||||
|
_giftsCollectionView.dataSource = self;
|
||||||
|
[_giftsCollectionView registerClass:[XPMineGiftCell class]
|
||||||
|
forCellWithReuseIdentifier:@"Gift Cell"];
|
||||||
|
}
|
||||||
|
return _giftsCollectionView;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (UILabel *)noDataLabel {
|
||||||
|
if (!_noDataLabel) {
|
||||||
|
_noDataLabel = [UILabel labelInitWithText:@"暂无礼物" font:[UIFont systemFontOfSize:14 weight:UIFontWeightMedium] textColor:UIColorFromRGB(0x191919)];
|
||||||
|
_noDataLabel.textAlignment = NSTextAlignmentCenter;
|
||||||
|
_noDataLabel.alpha = 0.5;
|
||||||
|
_noDataLabel.hidden = YES;
|
||||||
|
}
|
||||||
|
return _noDataLabel;
|
||||||
|
}
|
||||||
|
@end
|
@@ -81,7 +81,8 @@
|
|||||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
XPMineMedalCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Medal Cell"
|
XPMineMedalCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Medal Cell"
|
||||||
forIndexPath:indexPath];
|
forIndexPath:indexPath];
|
||||||
for (UserMedalModel *userMedal in self.medalsDataSource) {
|
UserMedalModel *userMedal = [self.medalsDataSource xpSafeObjectAtIndex:indexPath.row];
|
||||||
|
if (userMedal) {
|
||||||
cell.imageView.imageUrl = userMedal.picUrl;
|
cell.imageView.imageUrl = userMedal.picUrl;
|
||||||
}
|
}
|
||||||
return cell;
|
return cell;
|
||||||
|
@@ -35,6 +35,7 @@
|
|||||||
#import "XPMineDataGiftTableViewCell.h"
|
#import "XPMineDataGiftTableViewCell.h"
|
||||||
#import "XPMineAlbumTableViewCell.h"
|
#import "XPMineAlbumTableViewCell.h"
|
||||||
#import "XPMineMedalsTableViewCell.h"
|
#import "XPMineMedalsTableViewCell.h"
|
||||||
|
#import "XPMineGiftsTableViewCell.h"
|
||||||
|
|
||||||
#import "MedalModel.h"
|
#import "MedalModel.h"
|
||||||
|
|
||||||
@@ -220,10 +221,10 @@ typedef enum : NSUInteger {
|
|||||||
return 70;
|
return 70;
|
||||||
break;
|
break;
|
||||||
case Gifts:
|
case Gifts:
|
||||||
return self.isGiftsSectionFold ? 100 : 300;
|
return self.isGiftsSectionFold ? 150 : 300;
|
||||||
break;
|
break;
|
||||||
case LuckyGifts:
|
case LuckyGifts:
|
||||||
return self.isLuckyGiftsSectionFold ? 100 : 300;
|
return self.isLuckyGiftsSectionFold ? 150 : 300;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
@@ -294,16 +295,14 @@ typedef enum : NSUInteger {
|
|||||||
}
|
}
|
||||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
switch (indexPath.section) {
|
switch (indexPath.section) {
|
||||||
case Album:
|
case Album: {
|
||||||
{
|
|
||||||
XPMineAlbumTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineAlbumTableViewCell class])
|
XPMineAlbumTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineAlbumTableViewCell class])
|
||||||
forIndexPath:indexPath];
|
forIndexPath:indexPath];
|
||||||
cell.albumDataSource = self.userInfo.privatePhoto;
|
cell.albumDataSource = self.userInfo.privatePhoto;
|
||||||
return cell;
|
return cell;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Medal:
|
case Medal: {
|
||||||
{
|
|
||||||
XPMineMedalsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineMedalsTableViewCell class])
|
XPMineMedalsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineMedalsTableViewCell class])
|
||||||
forIndexPath:indexPath];
|
forIndexPath:indexPath];
|
||||||
cell.medalsDataSource = self.medalInfo.userMedals;
|
cell.medalsDataSource = self.medalInfo.userMedals;
|
||||||
@@ -311,18 +310,16 @@ typedef enum : NSUInteger {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Gifts:{
|
case Gifts:{
|
||||||
XPMineDataGiftTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineDataGiftTableViewCell class])];
|
XPMineGiftsTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineGiftsTableViewCell class])];
|
||||||
if (cell == nil) {
|
cell.giftsDataSource = self.userInfo.userGiftWall;
|
||||||
cell = [[XPMineDataGiftTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineDataGiftTableViewCell class])];
|
|
||||||
}
|
|
||||||
// cell.delegate = self;
|
|
||||||
cell.userGiftWall = self.userInfo.userGiftWall;
|
|
||||||
cell.userLuckyBagGiftWall = self.userInfo.userLuckyBagGiftWall;
|
|
||||||
return cell;
|
return cell;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case LuckyGifts:
|
case LuckyGifts:{
|
||||||
return [UITableViewCell new];
|
XPMineGiftsTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineGiftsTableViewCell class])];
|
||||||
|
cell.giftsDataSource = self.userInfo.userLuckyBagGiftWall;
|
||||||
|
return cell;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsEmptyTableViewCell class])];
|
return [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsEmptyTableViewCell class])];
|
||||||
@@ -533,8 +530,6 @@ typedef enum : NSUInteger {
|
|||||||
[self.datasource removeAllObjects];
|
[self.datasource removeAllObjects];
|
||||||
[self.datasource addObjectsFromArray:dynamicInfo];
|
[self.datasource addObjectsFromArray:dynamicInfo];
|
||||||
[self.tableView reloadData];
|
[self.tableView reloadData];
|
||||||
|
|
||||||
self.medalHeader.num = [NSString stringWithFormat:@"(%ld)", (long)self.userInfo.medals.medalCount];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setMedalInfo:(MedalModel *)medalInfo {
|
- (void)setMedalInfo:(MedalModel *)medalInfo {
|
||||||
@@ -557,6 +552,8 @@ typedef enum : NSUInteger {
|
|||||||
forCellReuseIdentifier:NSStringFromClass([XPMineAlbumTableViewCell class])];
|
forCellReuseIdentifier:NSStringFromClass([XPMineAlbumTableViewCell class])];
|
||||||
[_tableView registerClass:[XPMineMedalsTableViewCell class]
|
[_tableView registerClass:[XPMineMedalsTableViewCell class]
|
||||||
forCellReuseIdentifier:NSStringFromClass([XPMineMedalsTableViewCell class])];
|
forCellReuseIdentifier:NSStringFromClass([XPMineMedalsTableViewCell class])];
|
||||||
|
[_tableView registerClass:[XPMineGiftsTableViewCell class]
|
||||||
|
forCellReuseIdentifier:NSStringFromClass([XPMineGiftsTableViewCell class])];
|
||||||
[_tableView registerClass:[XPMonentsEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMonentsEmptyTableViewCell class])];
|
[_tableView registerClass:[XPMonentsEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMonentsEmptyTableViewCell class])];
|
||||||
[_tableView registerClass:[XPMonentsTableViewCell class] forCellReuseIdentifier:@"XPMonentsDynamicTableViewCell"];
|
[_tableView registerClass:[XPMonentsTableViewCell class] forCellReuseIdentifier:@"XPMonentsDynamicTableViewCell"];
|
||||||
[_tableView registerClass:[XPMineDataClanTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineDataClanTableViewCell class])];
|
[_tableView registerClass:[XPMineDataClanTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineDataClanTableViewCell class])];
|
||||||
|
@@ -250,7 +250,6 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (id<JXPagerViewListViewDelegate>)pagerView:(JXPagerView *)pagerView initListAtIndex:(NSInteger)index {
|
- (id<JXPagerViewListViewDelegate>)pagerView:(JXPagerView *)pagerView initListAtIndex:(NSInteger)index {
|
||||||
|
|
||||||
if(isMSRTL()){
|
if(isMSRTL()){
|
||||||
if (index == 1) {
|
if (index == 1) {
|
||||||
return self.userDataVC;
|
return self.userDataVC;
|
||||||
@@ -339,11 +338,14 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)ongetDetailInfoSuccess:(UserInfoModel *)userInfo {
|
- (void)ongetDetailInfoSuccess:(UserInfoModel *)userInfo {
|
||||||
|
self.userDataVC.userInfo.userGiftWall = userInfo.userGiftWall;
|
||||||
|
self.userDataVC.userInfo.userLuckyBagGiftWall = userInfo.userLuckyBagGiftWall;
|
||||||
self.userDataVC.dynamicInfo = userInfo.dynamicInfo;
|
self.userDataVC.dynamicInfo = userInfo.dynamicInfo;
|
||||||
self.userDataVC.medalInfo = userInfo.medals;
|
self.userDataVC.medalInfo = userInfo.medals;
|
||||||
self.userMomentVC.dynamicInfo = userInfo.dynamicInfo;
|
self.userMomentVC.dynamicInfo = userInfo.dynamicInfo;
|
||||||
self.headView.roomUid = userInfo.roomUid;
|
self.headView.roomUid = userInfo.roomUid;
|
||||||
self.giftVC.userInfo = userInfo;
|
self.giftVC.userInfo = userInfo;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)getAttentionStateSuccess:(BOOL)status {
|
- (void)getAttentionStateSuccess:(BOOL)status {
|
||||||
|
@@ -283,7 +283,8 @@
|
|||||||
if (model.userInfo == nil || !roomInfo.showGiftValue) [view resetGiftValue];
|
if (model.userInfo == nil || !roomInfo.showGiftValue) [view resetGiftValue];
|
||||||
}
|
}
|
||||||
[view showGiftValueMode:roomInfo.showGiftValue];
|
[view showGiftValueMode:roomInfo.showGiftValue];
|
||||||
if (self.hostDelegate.getUserInfo.uid && model.userInfo.uid == self.hostDelegate.getUserInfo.uid) {
|
if (self.hostDelegate.getUserInfo.uid &&
|
||||||
|
model.userInfo.uid == self.hostDelegate.getUserInfo.uid) {
|
||||||
selfNeedBroadcast = model.microState.micState == MicroMicStateType_Open;
|
selfNeedBroadcast = model.microState.micState == MicroMicStateType_Open;
|
||||||
if (model.microState.micState == MicroMicStateType_Close) {
|
if (model.microState.micState == MicroMicStateType_Close) {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user