房内增加任务完成提示
This commit is contained in:
@@ -299,6 +299,7 @@
|
|||||||
9BFB101F2897CC4300B3985E /* XPAnchorCardView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BFB101E2897CC4300B3985E /* XPAnchorCardView.m */; };
|
9BFB101F2897CC4300B3985E /* XPAnchorCardView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BFB101E2897CC4300B3985E /* XPAnchorCardView.m */; };
|
||||||
9BFB10222897D68400B3985E /* XPTabAnchorCardModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BFB10212897D68400B3985E /* XPTabAnchorCardModel.m */; };
|
9BFB10222897D68400B3985E /* XPTabAnchorCardModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BFB10212897D68400B3985E /* XPTabAnchorCardModel.m */; };
|
||||||
9BFE0D8E2898C8C300F53C24 /* XPAnchorCardSkillCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BFE0D8D2898C8C300F53C24 /* XPAnchorCardSkillCollectionViewCell.m */; };
|
9BFE0D8E2898C8C300F53C24 /* XPAnchorCardSkillCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BFE0D8D2898C8C300F53C24 /* XPAnchorCardSkillCollectionViewCell.m */; };
|
||||||
|
9BFE0D922899042600F53C24 /* XPTaskCompleteTipView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BFE0D912899042600F53C24 /* XPTaskCompleteTipView.m */; };
|
||||||
9BFE992E288142FD009DA429 /* RoomClassifyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BFE992D288142FD009DA429 /* RoomClassifyModel.m */; };
|
9BFE992E288142FD009DA429 /* RoomClassifyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BFE992D288142FD009DA429 /* RoomClassifyModel.m */; };
|
||||||
E80016232803CA5D00D6D17A /* XPMineGuildIncomeRecordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E80016222803CA5D00D6D17A /* XPMineGuildIncomeRecordViewController.m */; };
|
E80016232803CA5D00D6D17A /* XPMineGuildIncomeRecordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E80016222803CA5D00D6D17A /* XPMineGuildIncomeRecordViewController.m */; };
|
||||||
E80016262803CB2800D6D17A /* XPGuildIncomeHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = E80016252803CB2800D6D17A /* XPGuildIncomeHeaderView.m */; };
|
E80016262803CB2800D6D17A /* XPGuildIncomeHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = E80016252803CB2800D6D17A /* XPGuildIncomeHeaderView.m */; };
|
||||||
@@ -1487,6 +1488,8 @@
|
|||||||
9BFB10212897D68400B3985E /* XPTabAnchorCardModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPTabAnchorCardModel.m; sourceTree = "<group>"; };
|
9BFB10212897D68400B3985E /* XPTabAnchorCardModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPTabAnchorCardModel.m; sourceTree = "<group>"; };
|
||||||
9BFE0D8C2898C8C300F53C24 /* XPAnchorCardSkillCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPAnchorCardSkillCollectionViewCell.h; sourceTree = "<group>"; };
|
9BFE0D8C2898C8C300F53C24 /* XPAnchorCardSkillCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPAnchorCardSkillCollectionViewCell.h; sourceTree = "<group>"; };
|
||||||
9BFE0D8D2898C8C300F53C24 /* XPAnchorCardSkillCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPAnchorCardSkillCollectionViewCell.m; sourceTree = "<group>"; };
|
9BFE0D8D2898C8C300F53C24 /* XPAnchorCardSkillCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPAnchorCardSkillCollectionViewCell.m; sourceTree = "<group>"; };
|
||||||
|
9BFE0D902899042600F53C24 /* XPTaskCompleteTipView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPTaskCompleteTipView.h; sourceTree = "<group>"; };
|
||||||
|
9BFE0D912899042600F53C24 /* XPTaskCompleteTipView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPTaskCompleteTipView.m; sourceTree = "<group>"; };
|
||||||
9BFE992C288142FD009DA429 /* RoomClassifyModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomClassifyModel.h; sourceTree = "<group>"; };
|
9BFE992C288142FD009DA429 /* RoomClassifyModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomClassifyModel.h; sourceTree = "<group>"; };
|
||||||
9BFE992D288142FD009DA429 /* RoomClassifyModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomClassifyModel.m; sourceTree = "<group>"; };
|
9BFE992D288142FD009DA429 /* RoomClassifyModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomClassifyModel.m; sourceTree = "<group>"; };
|
||||||
B66633E061B1B34177CD011C /* Pods-xplan-ios.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-xplan-ios.release.xcconfig"; path = "Target Support Files/Pods-xplan-ios/Pods-xplan-ios.release.xcconfig"; sourceTree = "<group>"; };
|
B66633E061B1B34177CD011C /* Pods-xplan-ios.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-xplan-ios.release.xcconfig"; path = "Target Support Files/Pods-xplan-ios/Pods-xplan-ios.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
@@ -4211,6 +4214,15 @@
|
|||||||
path = AnchorCard;
|
path = AnchorCard;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
9BFE0D8F289903F600F53C24 /* TaskTip */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
9BFE0D902899042600F53C24 /* XPTaskCompleteTipView.h */,
|
||||||
|
9BFE0D912899042600F53C24 /* XPTaskCompleteTipView.m */,
|
||||||
|
);
|
||||||
|
path = TaskTip;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
BFB922F5D81845AC32D1E1ED /* Frameworks */ = {
|
BFB922F5D81845AC32D1E1ED /* Frameworks */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@@ -5992,6 +6004,7 @@
|
|||||||
E8AEAED8271413530017FCE0 /* View */ = {
|
E8AEAED8271413530017FCE0 /* View */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
9BFE0D8F289903F600F53C24 /* TaskTip */,
|
||||||
9B9BBF80288FBF93004E2E74 /* NewUserGift */,
|
9B9BBF80288FBF93004E2E74 /* NewUserGift */,
|
||||||
9B7D904A287BC4FC0033A45E /* AnchorCycleView */,
|
9B7D904A287BC4FC0033A45E /* AnchorCycleView */,
|
||||||
E87AE8C2284E1A6B00CAFBB3 /* NewUserGreet */,
|
E87AE8C2284E1A6B00CAFBB3 /* NewUserGreet */,
|
||||||
@@ -7983,6 +7996,7 @@
|
|||||||
E89DA67527009ACD008483C1 /* XPMineRechargeNavView.m in Sources */,
|
E89DA67527009ACD008483C1 /* XPMineRechargeNavView.m in Sources */,
|
||||||
E8C1672A2806B1E500ECB15C /* XPGuildSuperAdminSetTableViewCell.m in Sources */,
|
E8C1672A2806B1E500ECB15C /* XPGuildSuperAdminSetTableViewCell.m in Sources */,
|
||||||
E8834E4528003A8F0029CCC1 /* XPMineMangerListViewController.m in Sources */,
|
E8834E4528003A8F0029CCC1 /* XPMineMangerListViewController.m in Sources */,
|
||||||
|
9BFE0D922899042600F53C24 /* XPTaskCompleteTipView.m in Sources */,
|
||||||
9BE01AE728938AB600B50299 /* XPDressUpShopCardTableViewCell.m in Sources */,
|
9BE01AE728938AB600B50299 /* XPDressUpShopCardTableViewCell.m in Sources */,
|
||||||
E82E75062828E76400C25EF7 /* XPCoreDataManager.m in Sources */,
|
E82E75062828E76400C25EF7 /* XPCoreDataManager.m in Sources */,
|
||||||
1808072D2731598F001FD836 /* XPNetImageYYLabel.m in Sources */,
|
1808072D2731598F001FD836 /* XPNetImageYYLabel.m in Sources */,
|
||||||
|
@@ -76,6 +76,7 @@
|
|||||||
#import "XPRoomHalfMessageView.h"
|
#import "XPRoomHalfMessageView.h"
|
||||||
#import "XPAcrossRoomPKCountDownView.h"
|
#import "XPAcrossRoomPKCountDownView.h"
|
||||||
#import "XPNewUserRoomGiftView.h"
|
#import "XPNewUserRoomGiftView.h"
|
||||||
|
#import "XPTaskCompleteTipView.h"
|
||||||
///个播PK
|
///个播PK
|
||||||
#import "XPAnchorFansTeamEntranceView.h"
|
#import "XPAnchorFansTeamEntranceView.h"
|
||||||
#import "XPAnchorFansTeamViewController.h"
|
#import "XPAnchorFansTeamViewController.h"
|
||||||
@@ -133,6 +134,8 @@
|
|||||||
@property (nonatomic,assign) BOOL isLoadGreet;
|
@property (nonatomic,assign) BOOL isLoadGreet;
|
||||||
///获取新用户礼物倒计时3s
|
///获取新用户礼物倒计时3s
|
||||||
@property (nonatomic, strong) dispatch_source_t userGiftTimer;
|
@property (nonatomic, strong) dispatch_source_t userGiftTimer;
|
||||||
|
///任务完成提示
|
||||||
|
@property (nonatomic, strong) XPTaskCompleteTipView *taskTipView;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@@ -1602,6 +1605,31 @@
|
|||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma mark - 活动任务完成提示
|
||||||
|
- (void)handleActivityTaskTip:(AttachmentModel *)attachment {
|
||||||
|
if (!self.taskTipView.superview) {
|
||||||
|
[self addSubview:self.taskTipView];
|
||||||
|
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(jumpToTask:)];
|
||||||
|
[self.taskTipView addGestureRecognizer:tap];
|
||||||
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||||
|
if (self.taskTipView.superview) {
|
||||||
|
[self.taskTipView removeFromSuperview];
|
||||||
|
}
|
||||||
|
self.taskTipView = nil;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)jumpToTask:(UITapGestureRecognizer *)ges {
|
||||||
|
XPWebViewController * webVC =[[XPWebViewController alloc] init];
|
||||||
|
webVC.url = self.taskTipView.url;
|
||||||
|
[self.delegate.getCurrentNav pushViewController:webVC animated:YES];
|
||||||
|
if (self.taskTipView.superview) {
|
||||||
|
[self.taskTipView removeFromSuperview];
|
||||||
|
}
|
||||||
|
self.taskTipView = nil;
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - Getters And Setters
|
#pragma mark - Getters And Setters
|
||||||
- (XPRoomRankEntranceView *)contributeEnterView {
|
- (XPRoomRankEntranceView *)contributeEnterView {
|
||||||
if (!_contributeEnterView) {
|
if (!_contributeEnterView) {
|
||||||
@@ -1768,4 +1796,11 @@
|
|||||||
return _acrossPKCountView;
|
return _acrossPKCountView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (XPTaskCompleteTipView *)taskTipView {
|
||||||
|
if (!_taskTipView) {
|
||||||
|
_taskTipView = [[XPTaskCompleteTipView alloc] initWithFrame:CGRectMake(0, KScreenHeight - kSafeAreaBottomHeight-60, KScreenWidth, 20)];
|
||||||
|
}
|
||||||
|
return _taskTipView;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
18
xplan-ios/Main/Room/View/TaskTip/XPTaskCompleteTipView.h
Normal file
18
xplan-ios/Main/Room/View/TaskTip/XPTaskCompleteTipView.h
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// XPTaskCompleteTipView.h
|
||||||
|
// xplan-ios
|
||||||
|
//
|
||||||
|
// Created by GreenLand on 2022/8/2.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XPTaskCompleteTipView : UIView
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString *url;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
101
xplan-ios/Main/Room/View/TaskTip/XPTaskCompleteTipView.m
Normal file
101
xplan-ios/Main/Room/View/TaskTip/XPTaskCompleteTipView.m
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
//
|
||||||
|
// XPTaskCompleteTipView.m
|
||||||
|
// xplan-ios
|
||||||
|
//
|
||||||
|
// Created by GreenLand on 2022/8/2.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XPTaskCompleteTipView.h"
|
||||||
|
///tool
|
||||||
|
#import "ThemeColor.h"
|
||||||
|
#import "XPMacro.h"
|
||||||
|
///Third
|
||||||
|
#import <Masonry/Masonry.h>
|
||||||
|
|
||||||
|
@interface XPTaskCompleteTipView()
|
||||||
|
|
||||||
|
///背景
|
||||||
|
@property (nonatomic, strong) UIView *mainView;
|
||||||
|
///昵称
|
||||||
|
@property (nonatomic, strong) UILabel *nickLabel;
|
||||||
|
///昵称
|
||||||
|
@property (nonatomic, strong) UILabel *gotoLabel;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@implementation XPTaskCompleteTipView
|
||||||
|
|
||||||
|
- (instancetype)initWithFrame:(CGRect)frame {
|
||||||
|
if (self = [super initWithFrame:frame]) {
|
||||||
|
[self initSubViews];
|
||||||
|
[self initContraints];
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)initSubViews {
|
||||||
|
[self addSubview:self.mainView];
|
||||||
|
[self addSubview:self.nickLabel];
|
||||||
|
[self addSubview:self.gotoLabel];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)initContraints {
|
||||||
|
[self.mainView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.centerX.centerY.mas_equalTo(self);
|
||||||
|
make.height.mas_equalTo(20);
|
||||||
|
make.width.mas_equalTo(150);
|
||||||
|
}];
|
||||||
|
[self.nickLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.centerY.mas_equalTo(self);
|
||||||
|
make.left.mas_equalTo(self.mainView).mas_offset(15);
|
||||||
|
}];
|
||||||
|
[self.gotoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.mas_equalTo(self.nickLabel.mas_right).mas_offset(4);
|
||||||
|
make.centerY.mas_equalTo(self.mainView);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#pragma mark - getter
|
||||||
|
- (UIView *)mainView {
|
||||||
|
if (!_mainView) {
|
||||||
|
_mainView = [[UIView alloc] init];
|
||||||
|
_mainView.layer.cornerRadius = 10;
|
||||||
|
_mainView.layer.masksToBounds = YES;
|
||||||
|
_mainView.layer.borderWidth = 0.5;
|
||||||
|
_mainView.layer.borderColor = UIColorFromRGB(0xFFBC51).CGColor;
|
||||||
|
}
|
||||||
|
return _mainView;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (UILabel *)nickLabel {
|
||||||
|
if (!_nickLabel) {
|
||||||
|
UILabel *label = [[UILabel alloc] init];
|
||||||
|
label.font = [UIFont systemFontOfSize:12];
|
||||||
|
label.textColor = [UIColor whiteColor];
|
||||||
|
[label sizeToFit];
|
||||||
|
label.text = @"任务已完成";
|
||||||
|
_nickLabel = label;
|
||||||
|
}
|
||||||
|
return _nickLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (UILabel *)gotoLabel {
|
||||||
|
if (!_gotoLabel) {
|
||||||
|
UILabel *label = [[UILabel alloc] init];
|
||||||
|
label.font = [UIFont systemFontOfSize:12];
|
||||||
|
label.textColor = UIColorFromRGB(0xFFBC51);
|
||||||
|
[label sizeToFit];
|
||||||
|
label.text = @"查看奖励";
|
||||||
|
_gotoLabel = label;
|
||||||
|
}
|
||||||
|
return _gotoLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
Reference in New Issue
Block a user