覆盖羽声
This commit is contained in:
@@ -9,18 +9,23 @@
|
||||
#import "QXDressCell.h"
|
||||
#import "QXMineNetwork.h"
|
||||
#import "QXSeatHeaderView.h"
|
||||
#import "QXGiftPlayerManager.h"
|
||||
|
||||
@interface QXDressSubViewController ()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
|
||||
@property (nonatomic,strong)QXSeatHeaderView *headerImageView;
|
||||
@property (nonatomic,strong)UICollectionView *collectionView;
|
||||
@property (nonatomic,strong)UIButton *commitBtn;
|
||||
@property (nonatomic,assign)NSInteger selectedIndex;
|
||||
@property (nonatomic,strong)QXEffectContentView *fullEffectView;
|
||||
@end
|
||||
|
||||
@implementation QXDressSubViewController
|
||||
-(UIView *)listView{
|
||||
return self.view;
|
||||
}
|
||||
-(void)listWillAppear{
|
||||
[self getData];
|
||||
}
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
@@ -37,12 +42,13 @@
|
||||
}
|
||||
[self.view addSubview:self.collectionView];
|
||||
[self.view addSubview:self.commitBtn];
|
||||
[self.view addSubview:self.fullEffectView];
|
||||
}
|
||||
|
||||
-(void)getData{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork userDressListWithType:self.model.id successBlock:^(NSArray<QXUserDressModel *> * _Nonnull list) {
|
||||
|
||||
[weakSelf.dataArray removeAllObjects];
|
||||
[weakSelf.dataArray addObjectsFromArray:list];
|
||||
if (list.count > 0 ) {
|
||||
QXUserDressModel *model = [[QXUserDressModel alloc] init];
|
||||
@@ -70,7 +76,7 @@
|
||||
return cell;
|
||||
}
|
||||
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
CGFloat width = (SCREEN_WIDTH-15*2-22*2)/3;
|
||||
int width = (SCREEN_WIDTH-15*2-22*2-1)/3;
|
||||
return CGSizeMake(width, width/100*120);
|
||||
}
|
||||
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
@@ -81,7 +87,10 @@
|
||||
self.selectedIndex = indexPath.row;
|
||||
[collectionView reloadData];
|
||||
// MJWeakSelf
|
||||
|
||||
if ([self.model.id isEqualToString:@"2"]) {
|
||||
self.fullEffectView.hidden = NO;
|
||||
[self.fullEffectView previewEffectWith:model.play_image];
|
||||
}
|
||||
[self.headerImageView setHeadIcon:[QXGlobal shareGlobal].loginModel.avatar dress:model.play_image];
|
||||
|
||||
}
|
||||
@@ -141,4 +150,12 @@
|
||||
}
|
||||
return _headerImageView;
|
||||
}
|
||||
- (QXEffectContentView *)fullEffectView {
|
||||
if (!_fullEffectView) {
|
||||
_fullEffectView = [[QXEffectContentView alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||
_fullEffectView.queue = dispatch_queue_create("qx_room_full_preview_message.com", NULL);
|
||||
_fullEffectView.hidden = YES;
|
||||
}
|
||||
return _fullEffectView;
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#import "JXCategoryView.h"
|
||||
#import "QXDressSubViewController.h"
|
||||
#import "QXMineNetwork.h"
|
||||
#import "QXPropShopViewController.h"
|
||||
|
||||
@interface QXDressViewController ()<JXCategoryViewDelegate,JXCategoryListContainerViewDelegate>
|
||||
@property (nonatomic,strong)JXCategoryTitleView *categoryView;
|
||||
@@ -30,6 +31,17 @@
|
||||
-(void)setNavgationItems{
|
||||
[super setNavgationItems];
|
||||
self.navigationItem.title = QXText(@"个性装扮");
|
||||
UIButton*recordBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
|
||||
[recordBtn setTitle:QXText(@"道具商城") forState:(UIControlStateNormal)];
|
||||
[recordBtn setTitleColor:RGB16(0xFF8ACC) forState:(UIControlStateNormal)];
|
||||
recordBtn.titleLabel.font = [UIFont systemFontOfSize:16];
|
||||
[recordBtn addTarget:self action:@selector(recordAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:recordBtn];
|
||||
}
|
||||
|
||||
-(void)recordAction{
|
||||
QXPropShopViewController *vc = [[QXPropShopViewController alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
- (void)initSubViews{
|
||||
|
||||
Reference in New Issue
Block a user