提交
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
#import "QXCreatPhotosViewController.h"
|
||||
#import "QXMineNetwork.h"
|
||||
#import "QXPhotosDetailVC.h"
|
||||
#import "QXIntimateContentView.h"
|
||||
#import "QXHeartBeatSpaceViewController.h"
|
||||
|
||||
@interface QXUserHomePageViewController ()<JXCategoryViewDelegate,JXPagerViewDelegate,SDCycleScrollViewDelegate>
|
||||
@property (nonatomic,strong)UIImageView * backgourdImageView;
|
||||
@@ -27,6 +29,7 @@
|
||||
@property (nonatomic, strong) JXCategoryTitleView *categoryView;
|
||||
@property (nonatomic, strong) NSArray <NSString *> *titles;
|
||||
@property (nonatomic, assign)CGRect cycleScrollViewFrame;
|
||||
@property (nonatomic, strong)QXUserHomeModel *userModel;
|
||||
@end
|
||||
|
||||
@implementation QXUserHomePageViewController
|
||||
@@ -44,6 +47,8 @@
|
||||
self.navigationController.navigationBar.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
- (void)initSubViews{
|
||||
self.bgImageHidden = YES;
|
||||
self.view.backgroundColor = RGB16(0xF3F3F3);
|
||||
self.cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(0, 0, self.view.width, 121+NavContentHeight+16) delegate:self placeholderImage:[UIImage imageNamed:@"user_header_placehoulder"]];
|
||||
|
||||
self.cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
|
||||
@@ -57,7 +62,7 @@
|
||||
self.cycleScrollViewFrame = self.backgourdImageView.frame;
|
||||
[self.view addSubview:self.backgourdImageView];
|
||||
|
||||
self.titles = @[QXText(@"动态"),QXText(@"礼物墙"),QXText(@"我的相册")];
|
||||
self.titles = @[QXText(@"动态"),QXText(@"挚友"),QXText(@"我的相册")];
|
||||
_categoryView = [[JXCategoryTitleView alloc] init];
|
||||
self.categoryView.frame = CGRectMake(0, 0, 200, 48);
|
||||
self.categoryView.titles = self.titles;
|
||||
@@ -106,7 +111,15 @@
|
||||
-(void)getUserInfo{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork userHomePageWithUserId:self.user_id successBlock:^(QXUserHomeModel * _Nonnull userModel) {
|
||||
weakSelf.userModel = userModel;
|
||||
weakSelf.headerView.hidden = NO;
|
||||
weakSelf.headerView.model = userModel;
|
||||
if (weakSelf.userModel.cp_info != nil) {
|
||||
weakSelf.headerView.height = 243+ScaleWidth(40)+8+ScaleWidth(100)+14;
|
||||
}else{
|
||||
weakSelf.headerView.height = 243+ScaleWidth(40)+8;
|
||||
}
|
||||
[weakSelf.pagingView resizeTableHeaderViewHeightWithAnimatable:NO duration:0.1 curve:UIViewAnimationCurveLinear];
|
||||
NSArray *imgs;
|
||||
if (userModel.home_bgimages.length > 0) {
|
||||
imgs = [userModel.home_bgimages componentsSeparatedByString:@","];
|
||||
@@ -134,7 +147,7 @@
|
||||
return self.headerView;
|
||||
}
|
||||
- (NSUInteger)tableHeaderViewHeightInPagerView:(JXPagerView *)pagerView {
|
||||
return 215+26;
|
||||
return self.headerView.height;
|
||||
}
|
||||
|
||||
- (NSUInteger)heightForPinSectionHeaderInPagerView:(JXPagerView *)pagerView {
|
||||
@@ -155,10 +168,13 @@
|
||||
dynamicView.backgroundColor = RGB16(0xf6f6f6);
|
||||
return dynamicView;
|
||||
}else if(index == 1){
|
||||
QXUserGiftWallView *giftWallView = [[QXUserGiftWallView alloc] init];
|
||||
giftWallView.backgroundColor = RGB16(0xf6f6f6);
|
||||
giftWallView.user_id = self.user_id;
|
||||
return giftWallView;
|
||||
// QXUserGiftWallView *giftWallView = [[QXUserGiftWallView alloc] init];
|
||||
// giftWallView.backgroundColor = RGB16(0xf6f6f6);
|
||||
// giftWallView.user_id = self.user_id;
|
||||
// return giftWallView;
|
||||
QXIntimateContentView *intimateView = [[QXIntimateContentView alloc] init];
|
||||
intimateView.userId = self.user_id;
|
||||
return intimateView;
|
||||
}else{
|
||||
QXUserPhotosView *photosView = [[QXUserPhotosView alloc] init];
|
||||
photosView.user_id = self.user_id;
|
||||
@@ -179,6 +195,8 @@
|
||||
-(QXUserHomeHeaderView *)headerView{
|
||||
if (!_headerView) {
|
||||
_headerView = [[QXUserHomeHeaderView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 215+26)];
|
||||
_headerView.userId = self.user_id;
|
||||
_headerView.hidden = YES;
|
||||
}
|
||||
return _headerView;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user