Commit c6113e58 cgx

梳理任务积分业务逻辑

1 个父辈 2c7d6a1f
此文件类型无法预览
此文件类型无法预览
......@@ -38,7 +38,6 @@
D027EE2927FB51D0004BBA61 /* DSGifHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = D027EE2827FB51D0004BBA61 /* DSGifHeader.m */; };
D027EE3027FB52DA004BBA61 /* UIImage+Extras.m in Sources */ = {isa = PBXBuildFile; fileRef = D027EE2F27FB52DA004BBA61 /* UIImage+Extras.m */; };
D030C1B8284775930014946F /* RelaxTrainController.m in Sources */ = {isa = PBXBuildFile; fileRef = D030C1B7284775930014946F /* RelaxTrainController.m */; };
D033616028502B76005573CF /* DailyTaskTV.m in Sources */ = {isa = PBXBuildFile; fileRef = D033615F28502B76005573CF /* DailyTaskTV.m */; };
D0336163285035AB005573CF /* DailyBgView.m in Sources */ = {isa = PBXBuildFile; fileRef = D0336162285035AB005573CF /* DailyBgView.m */; };
D037C497284F4A22000F3089 /* SignTaskView.m in Sources */ = {isa = PBXBuildFile; fileRef = D037C496284F4A22000F3089 /* SignTaskView.m */; };
D037C49A284F4F0D000F3089 /* DailyTaskCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D037C499284F4F0D000F3089 /* DailyTaskCell.m */; };
......@@ -299,8 +298,6 @@
D027EE2F27FB52DA004BBA61 /* UIImage+Extras.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIImage+Extras.m"; sourceTree = "<group>"; };
D030C1B6284775930014946F /* RelaxTrainController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RelaxTrainController.h; sourceTree = "<group>"; };
D030C1B7284775930014946F /* RelaxTrainController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RelaxTrainController.m; sourceTree = "<group>"; };
D033615E28502B76005573CF /* DailyTaskTV.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DailyTaskTV.h; sourceTree = "<group>"; };
D033615F28502B76005573CF /* DailyTaskTV.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DailyTaskTV.m; sourceTree = "<group>"; };
D0336161285035AB005573CF /* DailyBgView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DailyBgView.h; sourceTree = "<group>"; };
D0336162285035AB005573CF /* DailyBgView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DailyBgView.m; sourceTree = "<group>"; };
D037C495284F4A22000F3089 /* SignTaskView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SignTaskView.h; sourceTree = "<group>"; };
......@@ -1093,8 +1090,6 @@
D0D4107B2844B8DB00009638 /* DailyTaskController.m */,
D0336161285035AB005573CF /* DailyBgView.h */,
D0336162285035AB005573CF /* DailyBgView.m */,
D033615E28502B76005573CF /* DailyTaskTV.h */,
D033615F28502B76005573CF /* DailyTaskTV.m */,
D037C49B284F5DE8000F3089 /* DailyTaskSrollView.h */,
D037C49C284F5DE8000F3089 /* DailyTaskSrollView.m */,
D0D4107D2844D38400009638 /* RankModel.h */,
......@@ -1972,7 +1967,6 @@
D0E65FFB2807A654006562F2 /* NSDictionary+HYBUnicodeReadable.m in Sources */,
D0A245F6283DB12100FB49AA /* WKWebView+Extras.m in Sources */,
D0E65FFA2807A654006562F2 /* NSArray+HYBUnicodeReadable.m in Sources */,
D033616028502B76005573CF /* DailyTaskTV.m in Sources */,
D08F79DE281A1838000D99DD /* TZPhotoPickerController.m in Sources */,
D04B3DC027F6F82D0022F8DF /* ProfileController.m in Sources */,
D01C9D7028168BFC00163567 /* NSDate+Extension.m in Sources */,
......@@ -2288,7 +2282,7 @@
CODE_SIGN_ENTITLEMENTS = DreamSleep/Basement/DSConfig/DreamSleepDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 5;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 4NDZ6UX8PW;
ENABLE_BITCODE = NO;
......@@ -2364,7 +2358,7 @@
CODE_SIGN_ENTITLEMENTS = DreamSleep/DreamSleep.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = 4NDZ6UX8PW;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
......@@ -2500,7 +2494,7 @@
CODE_SIGN_ENTITLEMENTS = DreamSleep/Basement/DSConfig/DreamSleepBeta.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 5;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 4NDZ6UX8PW;
ENABLE_BITCODE = NO;
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>DreamSleep.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>DreamSleepBeta.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>DreamSleepDev.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
</dict>
</dict>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
uuid = "B7FD559A-562B-4E26-9933-6F7E1817C3F7"
type = "0"
version = "2.0">
</Bucket>
......@@ -45,7 +45,7 @@
UILabel *leftLab = [UILabel dkLabWithText:@"小梦睡眠" font:BoldFont(24.0)];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftLab];
/* rightItem
/* rightItem */
UIButton *dailyTaskBtn = [UIButton new];
[dailyTaskBtn addTarget:self action:@selector(jumpToDailyTaskPage) forControlEvents:UIControlEventTouchUpInside];
[dailyTaskBtn dk_setImage:DKImagePickerWithNames(@"ic_home_meirirw", @"dk_ic_home_meirirw", @"ic_home_meirirw") forState:UIControlStateNormal];
......@@ -53,7 +53,6 @@
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self addScaleAnimtaionWithView:dailyTaskBtn];
});
*/
[self.view addSubview:self.homeTV];
[self.view addSubview:self.noisePlayBar];
......
......@@ -12,6 +12,8 @@ NS_ASSUME_NONNULL_BEGIN
/// 每日任务、新手任务cell
@interface DailyTaskCell : UITableViewCell
- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier indexPath:(NSIndexPath *)indexPath;
@end
NS_ASSUME_NONNULL_END
......@@ -6,14 +6,34 @@
//
#import "DailyTaskCell.h"
#import "SignTaskView.h"
@interface DailyTaskCell ()
@property (nonatomic, strong) SignTaskView *signTaskView;
@end
@implementation DailyTaskCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier indexPath:(NSIndexPath *)indexPath {
if (self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier]) {
self.selectionStyle = UITableViewCellSelectionStyleNone;
if (indexPath.section == 0) {
[self.contentView addSubview:self.signTaskView];
self.backgroundColor = DSClearColor;
} else {
self.dk_backgroundColorPicker = DKColorPickerWithKey(TabBarBG);
}
}
return self;
}
#pragma mark - lazy
- (SignTaskView *)signTaskView {
if (!_signTaskView) {
_signTaskView = [[SignTaskView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth - 30, 186)];
}
return _signTaskView;
}
@end
......@@ -9,8 +9,9 @@
@implementation DailyTaskSrollView
//- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecogn {
// return YES;
//}
//返回YES,则可以多个手势一起触发方法,返回NO则为互斥(比如外层UIScrollView名为mainScroll内嵌的UIScrollView名为subScroll,当我们拖动subScroll时,mainScroll是不会响应手势的(多个手势默认是互斥的),当下面这个代理返回YES时,subScroll和mainScroll就能同时响应手势,同时滚动,这符合我们这里的需求)
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
return YES;
}
@end
//
// DailyTaskTV.h
// DreamSleep
//
// Created by peter on 2022/6/8.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface DailyTaskTV : UITableView
@end
NS_ASSUME_NONNULL_END
//
// DailyTaskTV.m
// DreamSleep
//
// Created by peter on 2022/6/8.
//
#import "DailyTaskTV.h"
#import "DailyTaskCell.h"
#import "SignTaskView.h"
@interface DailyTaskTV () <UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) SignTaskView *signTaskView;
@end
@implementation DailyTaskTV
- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style {
if (self = [super initWithFrame:frame style:style]) {
// self.scrollEnabled = NO;
self.backgroundColor = DSClearColor;
[self debugViewShowBorderWithColor:DSBlack];
self.delegate = self;
self.dataSource = self;
self.tableHeaderView = self.signTaskView;
self.rowHeight = 50;
self.showsVerticalScrollIndicator = NO;
self.separatorStyle = UITableViewCellSeparatorStyleNone;
[self registerClass:[DailyTaskCell class] forCellReuseIdentifier:NSStringFromClass([DailyTaskCell class])];
self.height = self.signTaskView.height + 20*50 + 30;
}
return self;
}
#pragma mark - UITableViewDelegate && UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 2;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 10;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
DailyTaskCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([DailyTaskCell class]) forIndexPath:indexPath];
cell.textLabel.text = [NSString stringWithFormat:@"%ld", indexPath.row + 1];
return cell;
}
//- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecogn {
// return YES;
//}
- (SignTaskView *)signTaskView {
if (!_signTaskView) {
_signTaskView = [[SignTaskView alloc] initWithFrame:CGRectMake(15, 0, kScreenWidth - 30, 186)];
}
return _signTaskView;
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>AFNetworking.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>4</integer>
</dict>
<key>DKNightVersion.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>10</integer>
</dict>
<key>DOUAudioStreamer.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>19</integer>
</dict>
<key>FreeStreamer.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>15</integer>
</dict>
<key>IQKeyboardManager.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>16</integer>
</dict>
<key>MBProgressHUD.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>14</integer>
</dict>
<key>MJRefresh.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>17</integer>
</dict>
<key>Masonry.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>13</integer>
</dict>
<key>Pods-DreamSleep.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>12</integer>
</dict>
<key>Reachability.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>7</integer>
</dict>
<key>YYCache.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>11</integer>
</dict>
<key>YYImage.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>5</integer>
</dict>
<key>YYModel.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>8</integer>
</dict>
<key>YYWebImage.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>9</integer>
</dict>
<key>lottie-ios.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>18</integer>
</dict>
</dict>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Unity-iPhone.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>3</integer>
</dict>
<key>UnityFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>6</integer>
</dict>
</dict>
</dict>
</plist>
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!