Commit d090263f by ludi

恢复禁止截图,初步生成订阅的view

parent 472d79ed
......@@ -130,7 +130,7 @@ typedef enum : NSUInteger {
- (void)fus_showQuickChatEditView;
/// 显示关注问候view
-(void)fus_showFollowSalutationView;
//-(void)fus_showFollowSalutationView;
/**
弹出推流质量的View
*/
......
......@@ -157,6 +157,10 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
@implementation FUSLiveMainViewController
#pragma mark - Life Cycle
- (void)loadView {
self.view = [ScreenShieldView createWithFrame:UIScreen.mainScreen.bounds];
}
- (void)viewDidLoad {
[super viewDidLoad];
......
......@@ -541,6 +541,8 @@
BE78CBAE2C538D7E00F38855 /* FUSMyZoneHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = BE78C9802C538D7D00F38855 /* FUSMyZoneHeaderView.m */; };
BE78CBB02C538D7E00F38855 /* FUSMyZoneNewsFeedListView.h in Headers */ = {isa = PBXBuildFile; fileRef = BE78C9822C538D7D00F38855 /* FUSMyZoneNewsFeedListView.h */; };
BE78CBB12C538D7E00F38855 /* FUSMyZoneNewsFeedListView.m in Sources */ = {isa = PBXBuildFile; fileRef = BE78C9832C538D7D00F38855 /* FUSMyZoneNewsFeedListView.m */; };
F05A12012F4B000100000001 /* FUSMyZoneSubscribeCollectionView.h in Headers */ = {isa = PBXBuildFile; fileRef = F05A12032F4B000100000001 /* FUSMyZoneSubscribeCollectionView.h */; };
F05A12022F4B000100000001 /* FUSMyZoneSubscribeCollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = F05A12042F4B000100000001 /* FUSMyZoneSubscribeCollectionView.m */; };
BE78CBB22C538D7E00F38855 /* FUSMyZoneTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = BE78C9842C538D7D00F38855 /* FUSMyZoneTableView.h */; };
BE78CBB32C538D7E00F38855 /* FUSMyZoneTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = BE78C9852C538D7D00F38855 /* FUSMyZoneTableView.m */; };
BE78CBB42C538D7E00F38855 /* FUSPhotoBrowserCollectionViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = BE78C9862C538D7D00F38855 /* FUSPhotoBrowserCollectionViewCell.h */; };
......@@ -1565,6 +1567,8 @@
BE78C9812C538D7D00F38855 /* FUSMyZoneHeaderView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FUSMyZoneHeaderView.xib; sourceTree = "<group>"; };
BE78C9822C538D7D00F38855 /* FUSMyZoneNewsFeedListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FUSMyZoneNewsFeedListView.h; sourceTree = "<group>"; };
BE78C9832C538D7D00F38855 /* FUSMyZoneNewsFeedListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FUSMyZoneNewsFeedListView.m; sourceTree = "<group>"; };
F05A12032F4B000100000001 /* FUSMyZoneSubscribeCollectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FUSMyZoneSubscribeCollectionView.h; sourceTree = "<group>"; };
F05A12042F4B000100000001 /* FUSMyZoneSubscribeCollectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FUSMyZoneSubscribeCollectionView.m; sourceTree = "<group>"; };
BE78C9842C538D7D00F38855 /* FUSMyZoneTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FUSMyZoneTableView.h; sourceTree = "<group>"; };
BE78C9852C538D7D00F38855 /* FUSMyZoneTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FUSMyZoneTableView.m; sourceTree = "<group>"; };
BE78C9862C538D7D00F38855 /* FUSPhotoBrowserCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FUSPhotoBrowserCollectionViewCell.h; sourceTree = "<group>"; };
......@@ -3090,6 +3094,8 @@
BE78C9812C538D7D00F38855 /* FUSMyZoneHeaderView.xib */,
BE78C9822C538D7D00F38855 /* FUSMyZoneNewsFeedListView.h */,
BE78C9832C538D7D00F38855 /* FUSMyZoneNewsFeedListView.m */,
F05A12032F4B000100000001 /* FUSMyZoneSubscribeCollectionView.h */,
F05A12042F4B000100000001 /* FUSMyZoneSubscribeCollectionView.m */,
BE78C9842C538D7D00F38855 /* FUSMyZoneTableView.h */,
BE78C9852C538D7D00F38855 /* FUSMyZoneTableView.m */,
BE78C9862C538D7D00F38855 /* FUSPhotoBrowserCollectionViewCell.h */,
......@@ -3991,6 +3997,7 @@
BE189AAB2C7323FF0008418B /* FSRZonedictPrivacyMineView.h in Headers */,
BE78CB1D2C538D7E00F38855 /* FUSSetUserInfoViewController.h in Headers */,
BE78CBB02C538D7E00F38855 /* FUSMyZoneNewsFeedListView.h in Headers */,
F05A12012F4B000100000001 /* FUSMyZoneSubscribeCollectionView.h in Headers */,
BE78CCD02C538D8000F38855 /* TZImageRequestOperation.h in Headers */,
BE78C8AE2C537E1600F38855 /* FUSUserCenterRouter.h in Headers */,
BE189A832C7323FE0008418B /* FSRDynamicdictMotorView.h in Headers */,
......@@ -4948,6 +4955,7 @@
BE78CBEB2C538D7F00F38855 /* FUSReportOptionTableViewCell.m in Sources */,
BE78CB492C538D7E00F38855 /* FUSZoneSendJewelRankController.m in Sources */,
BE78CBB12C538D7E00F38855 /* FUSMyZoneNewsFeedListView.m in Sources */,
F05A12022F4B000100000001 /* FUSMyZoneSubscribeCollectionView.m in Sources */,
BE189A4C2C7323FE0008418B /* FSRDynamicImViewController.m in Sources */,
BE78CC042C538D7F00F38855 /* FUSNoticeSettingViewController.m in Sources */,
BE189A362C7323FE0008418B /* FSRLoginModel.m in Sources */,
......
......@@ -8,6 +8,7 @@
#import "FUSMyZoneNewsFeedListView.h"
#import "FUSMyZoneSubscribeCollectionView.h"
@interface FUSMyZoneNewsFeedListView () <UIScrollViewDelegate,FUSSegmentControlViewDelegate>
......@@ -51,7 +52,7 @@
- (void)fus_initSegmentView {
UIView *segmentView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, 70)];
self.segmentControlView = [[FUSSegmentControlView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, 40) withItems:@[[NSString fus_localString:@"分享"],[NSString fus_localString:@"相册"],[NSString fus_localString:@"点赞"]]];
self.segmentControlView = [[FUSSegmentControlView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, 40) withItems:@[[NSString fus_localString:@"分享"],[NSString fus_localString:@"相册"],[NSString fus_localString:@"点赞"],[NSString fus_localString:@"订阅"]]];
self.segmentControlView.alignment = FUSSegmentControlAlignmentCenter;
self.segmentControlView.isEqualSpace = YES;
[self.segmentControlView fus_setUnderLineSelectedImage:UIImage.fus_segmentSelected];
......@@ -84,7 +85,6 @@
self.scrollView.bounces = NO;
self.scrollView.delegate = self;
self.scrollView.pagingEnabled = YES;
self.scrollView.contentSize = CGSizeMake(self.scrollView.width * 3, self.scrollView.height);
[self addSubview:self.scrollView];
self.collectionViewList = [NSMutableArray array];
......@@ -140,17 +140,38 @@
likeCollectionView.contentInset = UIEdgeInsetsMake(0, 0, 70, 0);
CGRect subscribeRect = self.scrollView.bounds;
subscribeRect.origin.x = self.scrollView.width * 3;
// 订阅分页沿用统一的 collectionView 实体结构,但内部只保留固定内容容器。
FUSMyZoneSubscribeCollectionView *subscribeCollectionView = [[FUSMyZoneSubscribeCollectionView alloc] initWithFrame:subscribeRect dataType:FUSNewsFeedDataTypeZoneShare columnNum:2 zoneId:self.zoneId];
subscribeCollectionView.fus_scrollViewDidScrollHandler = ^(FUSNewsFeedCollectionView * _Nonnull scrollView, CGFloat beginY) {
if (weakSelf.fus_scrollViewDidScrollHandler) {
weakSelf.fus_scrollViewDidScrollHandler(scrollView);
}
};
subscribeCollectionView.newsFeedScrollViewDidScaleHandler = ^(BOOL canPassScroll) {
weakSelf.scrollViewCanBeScroll = canPassScroll;
if (!canPassScroll) {
[weakSelf fus_scrollToNearPage];
}
};
subscribeCollectionView.contentInset = UIEdgeInsetsMake(0, 0, 70, 0);
[self.collectionViewList addObject:shareCollectionView];
[self.collectionViewList addObject:albumCollectionView];
[self.collectionViewList addObject:likeCollectionView];
[self.collectionViewList addObject:subscribeCollectionView];
[shareCollectionView addObserver:self forKeyPath:@"contentSize" options:NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld context:nil];
[albumCollectionView addObserver:self forKeyPath:@"contentSize" options:NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld context:nil];
[likeCollectionView addObserver:self forKeyPath:@"contentSize" options:NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld context:nil];
[subscribeCollectionView addObserver:self forKeyPath:@"contentSize" options:NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld context:nil];
[self.scrollView addSubview:shareCollectionView];
[self.scrollView addSubview:albumCollectionView];
[self.scrollView addSubview:likeCollectionView];
[self.scrollView addSubview:subscribeCollectionView];
self.scrollView.contentSize = CGSizeMake(self.scrollView.width * self.collectionViewList.count, self.scrollView.height);
}
......@@ -167,7 +188,7 @@
rect.origin.x = self.scrollView.width * i;
self.collectionViewList[i].frame = rect;
}
self.scrollView.contentSize = CGSizeMake(self.scrollView.width * 3, self.scrollView.height);
self.scrollView.contentSize = CGSizeMake(self.scrollView.width * self.collectionViewList.count, self.scrollView.height);
}
}
......
//
// FUSMyZoneSubscribeCollectionView.h
// FusiLive
//
// Created by ludy on 2026/5/28.
// Copyright © 2024年 FusiYa. All rights reserved.
//
#import "FUSNewsFeedCollectionView.h"
NS_ASSUME_NONNULL_BEGIN
@interface FUSMyZoneSubscribeCollectionView : FUSNewsFeedCollectionView
/// 订阅分页的固定内容容器,用于承载后续自定义内容。
@property (nonatomic, strong, readonly) UIView *subscribeContainerView;
/// 订阅分页的固定内容高度,供外层统一计算容器高度。
@property (nonatomic, assign, readonly) CGFloat subscribeContentHeight;
@end
NS_ASSUME_NONNULL_END
//
// FUSMyZoneSubscribeCollectionView.m
// FusiLive
//
// Created by ludy on 2026/5/28.
// Copyright © 2024年 FusiYa. All rights reserved.
//
#import "FUSMyZoneSubscribeCollectionView.h"
@interface FUSMyZoneSubscribeCollectionView ()
/// 订阅分页的固定内容容器,用于保持与动态分页一致的实体页结构。
@property (nonatomic, strong) UIView *subscribeContainerView;
@end
@implementation FUSMyZoneSubscribeCollectionView
/// 重写父类初始化逻辑,仅保留统一的容器风格,不走动态列表请求。
- (void)fus_initials {
self.backgroundColor = UIColor.fus_appBGColor;
self.showsHorizontalScrollIndicator = NO;
self.showsVerticalScrollIndicator = NO;
self.bounces = NO;
if (@available(iOS 11.0, *)) {
[self setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever];
}
self.subscribeContainerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.bounds), self.subscribeContentHeight)];
self.subscribeContainerView.backgroundColor = UIColor.clearColor;
[self addSubview:self.subscribeContainerView];
self.contentSize = CGSizeMake(CGRectGetWidth(self.bounds), self.subscribeContentHeight);
}
/// 跟随外层布局更新固定内容容器尺寸。
- (void)layoutSubviews {
[super layoutSubviews];
self.subscribeContainerView.frame = CGRectMake(0, 0, CGRectGetWidth(self.bounds), self.subscribeContentHeight);
self.contentSize = CGSizeMake(CGRectGetWidth(self.bounds), self.subscribeContentHeight);
}
/// 返回订阅分页的固定内容高度。
- (CGFloat)subscribeContentHeight {
return 256.0;
}
/// 返回订阅分页用于占位的最小高度。
- (CGFloat)emptyViewHeight {
return self.subscribeContentHeight;
}
@end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment