修改每日任务跳转房间出错
This commit is contained in:
@@ -748,7 +748,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = QXLive/QXLive.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
CURRENT_PROJECT_VERSION = 2;
|
||||
DEVELOPMENT_TEAM = 8798G5VMH9;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@@ -787,7 +787,7 @@
|
||||
"$(inherited)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.0;
|
||||
MARKETING_VERSION = 1.1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
@@ -814,7 +814,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = QXLive/QXLive.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
CURRENT_PROJECT_VERSION = 2;
|
||||
DEVELOPMENT_TEAM = 8798G5VMH9;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@@ -853,7 +853,7 @@
|
||||
"$(inherited)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.0;
|
||||
MARKETING_VERSION = 1.1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
@@ -1207,7 +1207,7 @@
|
||||
"$(inherited)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.1;
|
||||
MARKETING_VERSION = 1.0.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive.test;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
@@ -1271,7 +1271,7 @@
|
||||
"$(inherited)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.1;
|
||||
MARKETING_VERSION = 1.0.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive.test;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
|
||||
@@ -25,6 +25,12 @@
|
||||
[self getData];
|
||||
self.page = 1;
|
||||
}
|
||||
-(void)viewWillDisappear:(BOOL)animated{
|
||||
[super viewWillDisappear:animated];
|
||||
if ([self.navigationController isKindOfClass:[QXRoomNavigationController class]]) {
|
||||
[self.navigationController setNavigationBarHidden:YES animated:NO];
|
||||
}
|
||||
}
|
||||
-(void)didReceiveMemoryWarning{
|
||||
[super didReceiveMemoryWarning];
|
||||
[[SDImageCache sharedImageCache] clearMemory];
|
||||
|
||||
@@ -96,7 +96,8 @@ typedef void (^showFinishBlock)(void);
|
||||
-(void)joinRoomWithRoomId:(NSString*)roomId
|
||||
isRejoin:(BOOL)isRejoin
|
||||
navagationController:(UINavigationController*)navagationController;
|
||||
|
||||
/// 回到房间
|
||||
-(void)popToRoomViewController;
|
||||
/**
|
||||
退出房间
|
||||
*/
|
||||
|
||||
@@ -198,12 +198,26 @@
|
||||
return;
|
||||
}
|
||||
|
||||
navagationController = (QXBaseNavigationController*)KEYWINDOW.rootViewController;
|
||||
navagationController = (QXRoomNavigationController*)KEYWINDOW.rootViewController;
|
||||
// navagationController.interactivePopGestureRecognizer.enabled = NO;
|
||||
if (_miniView) {
|
||||
[_miniView removeFromSuperview];
|
||||
_miniView = nil;
|
||||
}
|
||||
if (QXGlobal.shareGlobal.taskModel != nil) {
|
||||
/// 是否带有每日任务
|
||||
if (QXGlobal.shareGlobal.taskModel.task_id.intValue == 9) {
|
||||
/// 是计时任务
|
||||
if (_timer == nil) {
|
||||
_timer = [QXTimer scheduledTimerWithTimeInterval:1 repeats:YES queue:dispatch_get_main_queue() block:^{
|
||||
QXGlobal.shareGlobal.taskTime++;
|
||||
if (QXGlobal.shareGlobal.taskTime%60 == 0) {
|
||||
[[QXGlobal shareGlobal] finishTask];
|
||||
}
|
||||
}];
|
||||
}
|
||||
}
|
||||
}
|
||||
if ([roomId isEqualToString:self.roomId]) {
|
||||
if ([navagationController.viewControllers containsObject:self.roomVC]) {
|
||||
return;
|
||||
@@ -278,23 +292,17 @@
|
||||
}];
|
||||
}
|
||||
}
|
||||
if (QXGlobal.shareGlobal.taskModel != nil) {
|
||||
/// 是否带有每日任务
|
||||
if (QXGlobal.shareGlobal.taskModel.task_id.intValue == 9) {
|
||||
/// 是计时任务
|
||||
if (_timer == nil) {
|
||||
_timer = [QXTimer scheduledTimerWithTimeInterval:1 repeats:YES queue:dispatch_get_main_queue() block:^{
|
||||
QXGlobal.shareGlobal.taskTime++;
|
||||
if (QXGlobal.shareGlobal.taskTime%60 == 0) {
|
||||
[[QXGlobal shareGlobal] finishTask];
|
||||
}
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)popToRoomViewController{
|
||||
QXRoomNavigationController *navagationController = (QXRoomNavigationController*)KEYWINDOW.rootViewController;
|
||||
for (UIViewController *vc in navagationController.viewControllers) {
|
||||
if ([vc isKindOfClass:[QXRoomViewController class]]) {
|
||||
[navagationController popToViewController:vc animated:YES];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-(void)quitRoomWithRoomId:(NSString *)roomId{
|
||||
[UIApplication sharedApplication].idleTimerDisabled = NO;
|
||||
/// 移除所有红包
|
||||
|
||||
16
QXLive/Base/QXRoomNavigationController.h
Normal file
16
QXLive/Base/QXRoomNavigationController.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// QXRoomNavigationController.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/10/27.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXRoomNavigationController : UINavigationController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
64
QXLive/Base/QXRoomNavigationController.m
Normal file
64
QXLive/Base/QXRoomNavigationController.m
Normal file
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// QXRoomNavigationController.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/10/27.
|
||||
//
|
||||
|
||||
#import "QXRoomNavigationController.h"
|
||||
|
||||
@implementation QXRoomNavigationController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
self.interactivePopGestureRecognizer.delegate = self;
|
||||
self.delegate = self;
|
||||
}
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
}
|
||||
|
||||
-(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
|
||||
if (self.viewControllers.count == 1) {
|
||||
viewController.hidesBottomBarWhenPushed = YES;
|
||||
}
|
||||
// if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
|
||||
// self.interactivePopGestureRecognizer.enabled = YES;
|
||||
// }
|
||||
[super pushViewController:viewController animated:animated];
|
||||
}
|
||||
//-(UIViewController *)popViewControllerAnimated:(BOOL)animated{
|
||||
// if (self.childViewControllers.count == 2) {
|
||||
// if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
|
||||
// self.interactivePopGestureRecognizer.enabled = YES;
|
||||
// }
|
||||
// }
|
||||
// return [super popViewControllerAnimated:animated];
|
||||
//}
|
||||
-(void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
|
||||
if (self.childViewControllers.count > 1) {
|
||||
if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
|
||||
if ([self.visibleViewController isKindOfClass:NSClassFromString(@"QXRoomViewController")] || [self.visibleViewController isKindOfClass:NSClassFromString(@"QXChirldViewController")]) {
|
||||
self.interactivePopGestureRecognizer.enabled = NO;
|
||||
}else{
|
||||
self.interactivePopGestureRecognizer.enabled = YES;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
|
||||
self.interactivePopGestureRecognizer.enabled = NO;
|
||||
}
|
||||
}
|
||||
}
|
||||
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
|
||||
if (self.viewControllers.count == 1) {
|
||||
return NO;
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
@end
|
||||
@@ -29,6 +29,7 @@
|
||||
[self.navigationController setNavigationBarHidden:NO animated:YES];
|
||||
[self getDayTask];
|
||||
}
|
||||
|
||||
-(void)setNavgationItems{
|
||||
[super setNavgationItems];
|
||||
self.navigationItem.title = QXText(@"每日任务");
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
if (self.model.task_status.intValue == 1) {
|
||||
if (self.model.task_id.intValue == 9 || self.model.task_id.intValue == 10) {
|
||||
QXGlobal.shareGlobal.taskModel = self.model;
|
||||
if ([[QXGlobal shareGlobal].roomId isEqualToString:self.model.from_id]) {
|
||||
[[QXGlobal shareGlobal] popToRoomViewController];
|
||||
}
|
||||
[[QXGlobal shareGlobal] joinRoomWithRoomId:self.model.from_id isRejoin:NO navagationController:self.viewController.navigationController];
|
||||
}
|
||||
}else if (self.model.task_status.intValue == 2) {
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
#import "IQKeyboardManager.h"
|
||||
#import "QXChirldViewController.h"
|
||||
#import "QXMineNetwork.h"
|
||||
#import "QXRoomNavigationController.h"
|
||||
#if DEBUG
|
||||
#import <LLDebugTool.h>
|
||||
#endif
|
||||
@@ -114,7 +115,7 @@
|
||||
self.window.rootViewController = na;
|
||||
}else{
|
||||
self.tabbarVC = [[QXTabbarController alloc] init];
|
||||
QXBaseNavigationController *na = [[QXBaseNavigationController alloc] initWithRootViewController:self.tabbarVC];
|
||||
QXRoomNavigationController *na = [[QXRoomNavigationController alloc] initWithRootViewController:self.tabbarVC];
|
||||
na.navigationBarHidden = YES;
|
||||
self.window.rootViewController = na;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,9 @@
|
||||
#import "UIControl+QX.h"
|
||||
#import "QXBaseWebViewController.h"
|
||||
#import "QXBaseNavigationController.h"
|
||||
#import "QXRoomNavigationController.h"
|
||||
#import "QXCOSUploadManager.h"
|
||||
|
||||
|
||||
#import "QXLive-Bridging-Header.h"
|
||||
#endif /* PrefixHeader_pch */
|
||||
|
||||
@@ -113,13 +113,28 @@ QXRoomUserInfoViewDelegate
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
NSInteger count = 0;
|
||||
for (int i = 0; i < marr.count; i++) {
|
||||
UIViewController *vc = marr[i];
|
||||
if ([vc isKindOfClass:[QXRoomViewController class]]){
|
||||
count++;
|
||||
}
|
||||
if ([vc isKindOfClass:[QXRoomViewController class]] && (i == marr.count-2)) {
|
||||
[marr removeObject:vc];
|
||||
break;
|
||||
self.navigationController.viewControllers = marr;
|
||||
}
|
||||
}
|
||||
if (count>=2) {
|
||||
for (int i = 0; i < marr.count; i++) {
|
||||
UIViewController *vc = marr[i];
|
||||
if ([vc isKindOfClass:[QXRoomViewController class]]) {
|
||||
[marr removeObject:vc];
|
||||
self.navigationController.viewControllers = marr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[self playHWDMP4];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[[QXGiftPlayerManager shareManager] startPlay];
|
||||
|
||||
@@ -923,6 +923,7 @@ NSInteger maxMessageCount = 20;
|
||||
}
|
||||
-(void)initSubviews{
|
||||
self.bgView = [[UIView alloc] init];
|
||||
self.bgView.backgroundColor = UIColor.clearColor;
|
||||
[self.contentView addSubview:self.bgView];
|
||||
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(16);
|
||||
@@ -1017,10 +1018,14 @@ NSInteger maxMessageCount = 20;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(void)layoutSubviews{
|
||||
[super layoutSubviews];
|
||||
[self.bgView addRoundedCornersWithRadius:8];
|
||||
}
|
||||
-(void)loadBubble{
|
||||
if ([self.message.FromUserInfo.chat_bubble isExist]) {
|
||||
self.bubbleImageView.backgroundColor = UIColor.clearColor;
|
||||
self.bgView.backgroundColor = UIColor.clearColor;
|
||||
// self.bubbleImageView.image = [[UIImage imageNamed:@"chat_bubble2"] resizableImageWithCapInsets:UIEdgeInsetsMake(30, 40, 40, 40) resizingMode:(UIImageResizingModeStretch)];;
|
||||
[self.bubbleImageView sd_setImageWithURL:[NSURL URLWithString:self.message.FromUserInfo.chat_bubble] placeholderImage:nil options:SDWebImageRetryFailed completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
|
||||
image = [image resizableImageWithCapInsets:UIEdgeInsetsMake(40, 40, 40, 40) resizingMode:(UIImageResizingModeStretch)];
|
||||
@@ -1048,7 +1053,8 @@ NSInteger maxMessageCount = 20;
|
||||
make.top.mas_equalTo(11);
|
||||
}];
|
||||
self.bubbleImageView.image = nil;
|
||||
self.bubbleImageView.backgroundColor = messageBubbleColor;
|
||||
self.bubbleImageView.backgroundColor = UIColor.clearColor;
|
||||
self.bgView.backgroundColor = messageBubbleColor;
|
||||
}
|
||||
}
|
||||
-(NSMutableArray *)iconViewArray{
|
||||
|
||||
Reference in New Issue
Block a user