diff --git a/xplan-ios/Main/Message/View/SessionListHeadView/XPSessionListHeadView.m b/xplan-ios/Main/Message/View/SessionListHeadView/XPSessionListHeadView.m index e8547143..d7d41e30 100644 --- a/xplan-ios/Main/Message/View/SessionListHeadView/XPSessionListHeadView.m +++ b/xplan-ios/Main/Message/View/SessionListHeadView/XPSessionListHeadView.m @@ -26,8 +26,6 @@ NSString * const kMengXinShowReadDotKey = @"kMengXinShowReadDotKey"; @property (nonatomic, strong) UIStackView *mainStackView; ///工具条 @property (nonatomic, strong) UIStackView *toolStackView; -///好友容器 -@property (nonatomic, strong) UIView *friendContentView; ///好友列表 @property (nonatomic, strong) UICollectionView *collectionView; @@ -198,10 +196,12 @@ NSString * const kMengXinShowReadDotKey = @"kMengXinShowReadDotKey"; - (void)setFriendsArray:(NSArray *)friendsArray { _friendsArray = friendsArray; - if (friendsArray.count) { - self.friendContentView.hidden = NO; [self.collectionView reloadData]; - } + if (_friendsArray.count > 0) { + self.collectionView.hidden = NO; + } else { + self.collectionView.hidden = YES; + } } - (UIStackView *)mainStackView { if (!_mainStackView) { @@ -231,13 +231,6 @@ NSString * const kMengXinShowReadDotKey = @"kMengXinShowReadDotKey"; } return _funtionArray; } -- (UIView *)friendContentView { - if (!_friendContentView) { - _friendContentView = [[UIView alloc] init]; - _friendContentView.hidden = YES; - } - return _friendContentView; -} - (UICollectionView *)collectionView { if (!_collectionView) { @@ -254,6 +247,7 @@ NSString * const kMengXinShowReadDotKey = @"kMengXinShowReadDotKey"; _collectionView.backgroundColor = [UIColor clearColor]; _collectionView.layer.cornerRadius = 8; _collectionView.layer.masksToBounds = YES; + _collectionView.hidden = YES; _collectionView.showsHorizontalScrollIndicator = NO; } return _collectionView;