Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
陈高翔
/
DreamSleep-iOS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit d21a6df7
由
cgx
编写于
2022-06-07 18:23:23 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
每日任务部分页面搭建
1 个父辈
2db98064
显示空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
284 行增加
和
9 行删除
DreamSleep/DreamSleep.xcodeproj/project.pbxproj
DreamSleep/DreamSleep/Basement/H5/DsWebController.m
DreamSleep/DreamSleep/Class/AISleepModule/AISleepCoachController.m
DreamSleep/DreamSleep/Class/AISleepModule/RelaxTrainController.m
DreamSleep/DreamSleep/Class/ProfileModule/ScoreTaskAI/DailyTaskCell.h
DreamSleep/DreamSleep/Class/ProfileModule/ScoreTaskAI/DailyTaskCell.m
DreamSleep/DreamSleep/Class/ProfileModule/ScoreTaskAI/DailyTaskController.m
DreamSleep/DreamSleep/Class/ProfileModule/ScoreTaskAI/DailyTaskSrollView.h
DreamSleep/DreamSleep/Class/ProfileModule/ScoreTaskAI/DailyTaskSrollView.m
DreamSleep/DreamSleep/Class/ProfileModule/ScoreTaskAI/SignTaskView.h
DreamSleep/DreamSleep/Class/ProfileModule/ScoreTaskAI/SignTaskView.m
DreamSleep/DreamSleep/Resource/Assets.xcassets/ScoreTask/bg_rw.imageset/Contents.json
DreamSleep/DreamSleep/Resource/Assets.xcassets/ScoreTask/bg_rw.imageset/bg_rw.png
DreamSleep/DreamSleep/Resource/Assets.xcassets/ScoreTask/bg_rw.imageset/bg_rw@2x.png
DreamSleep/DreamSleep/Resource/Assets.xcassets/ScoreTask/bg_rw.imageset/bg_rw@3x.png
DreamSleep/DreamSleep/Resource/Assets.xcassets/ScoreTask/dk_bg_rw.imageset/Contents.json
DreamSleep/DreamSleep/Resource/Assets.xcassets/ScoreTask/dk_bg_rw.imageset/dk_bg_rw.png
DreamSleep/DreamSleep/Resource/Assets.xcassets/ScoreTask/dk_bg_rw.imageset/dk_bg_rw@2x.png
DreamSleep/DreamSleep/Resource/Assets.xcassets/ScoreTask/dk_bg_rw.imageset/dk_bg_rw@3x.png
DreamSleep/DreamSleep.xcodeproj/project.pbxproj
查看文件 @
d21a6df
...
@@ -33,6 +33,9 @@
...
@@ -33,6 +33,9 @@
D027EE3027FB52DA004BBA61 /* UIImage+Extras.m in Sources */ = {isa = PBXBuildFile; fileRef = D027EE2F27FB52DA004BBA61 /* UIImage+Extras.m */; };
D027EE3027FB52DA004BBA61 /* UIImage+Extras.m in Sources */ = {isa = PBXBuildFile; fileRef = D027EE2F27FB52DA004BBA61 /* UIImage+Extras.m */; };
D027EE3227FB5464004BBA61 /* pull_down.gif in Resources */ = {isa = PBXBuildFile; fileRef = D027EE3127FB5464004BBA61 /* pull_down.gif */; };
D027EE3227FB5464004BBA61 /* pull_down.gif in Resources */ = {isa = PBXBuildFile; fileRef = D027EE3127FB5464004BBA61 /* pull_down.gif */; };
D030C1B8284775930014946F /* RelaxTrainController.m in Sources */ = {isa = PBXBuildFile; fileRef = D030C1B7284775930014946F /* RelaxTrainController.m */; };
D030C1B8284775930014946F /* RelaxTrainController.m in Sources */ = {isa = PBXBuildFile; fileRef = D030C1B7284775930014946F /* RelaxTrainController.m */; };
D037C497284F4A22000F3089 /* SignTaskView.m in Sources */ = {isa = PBXBuildFile; fileRef = D037C496284F4A22000F3089 /* SignTaskView.m */; };
D037C49A284F4F0D000F3089 /* DailyTaskCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D037C499284F4F0D000F3089 /* DailyTaskCell.m */; };
D037C49D284F5DE8000F3089 /* DailyTaskSrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = D037C49C284F5DE8000F3089 /* DailyTaskSrollView.m */; };
D03ABDB028328F4300DD88B0 /* UnityFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03ABDAF28328F4300DD88B0 /* UnityFramework.framework */; };
D03ABDB028328F4300DD88B0 /* UnityFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03ABDAF28328F4300DD88B0 /* UnityFramework.framework */; };
D03ABDB128328F4400DD88B0 /* UnityFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D03ABDAF28328F4300DD88B0 /* UnityFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
D03ABDB128328F4400DD88B0 /* UnityFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D03ABDAF28328F4300DD88B0 /* UnityFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
D03AE82B281A9010001C0726 /* MyFeedDetailModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D03AE82A281A9010001C0726 /* MyFeedDetailModel.m */; };
D03AE82B281A9010001C0726 /* MyFeedDetailModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D03AE82A281A9010001C0726 /* MyFeedDetailModel.m */; };
...
@@ -281,6 +284,12 @@
...
@@ -281,6 +284,12 @@
D027EE3127FB5464004BBA61 /* pull_down.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = pull_down.gif; sourceTree = "<group>"; };
D027EE3127FB5464004BBA61 /* pull_down.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = pull_down.gif; sourceTree = "<group>"; };
D030C1B6284775930014946F /* RelaxTrainController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RelaxTrainController.h; 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>"; };
D030C1B7284775930014946F /* RelaxTrainController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RelaxTrainController.m; sourceTree = "<group>"; };
D037C495284F4A22000F3089 /* SignTaskView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SignTaskView.h; sourceTree = "<group>"; };
D037C496284F4A22000F3089 /* SignTaskView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SignTaskView.m; sourceTree = "<group>"; };
D037C498284F4F0D000F3089 /* DailyTaskCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DailyTaskCell.h; sourceTree = "<group>"; };
D037C499284F4F0D000F3089 /* DailyTaskCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DailyTaskCell.m; sourceTree = "<group>"; };
D037C49B284F5DE8000F3089 /* DailyTaskSrollView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DailyTaskSrollView.h; sourceTree = "<group>"; };
D037C49C284F5DE8000F3089 /* DailyTaskSrollView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DailyTaskSrollView.m; sourceTree = "<group>"; };
D03ABDAB28328F1400DD88B0 /* UnityFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = UnityFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D03ABDAB28328F1400DD88B0 /* UnityFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = UnityFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D03ABDAF28328F4300DD88B0 /* UnityFramework.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UnityFramework.framework; path = "TapiOS/build/Release-iphoneos/UnityFramework.framework"; sourceTree = "<group>"; };
D03ABDAF28328F4300DD88B0 /* UnityFramework.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UnityFramework.framework; path = "TapiOS/build/Release-iphoneos/UnityFramework.framework"; sourceTree = "<group>"; };
D03AE829281A9010001C0726 /* MyFeedDetailModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyFeedDetailModel.h; sourceTree = "<group>"; };
D03AE829281A9010001C0726 /* MyFeedDetailModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyFeedDetailModel.h; sourceTree = "<group>"; };
...
@@ -1044,8 +1053,14 @@
...
@@ -1044,8 +1053,14 @@
D091E66D283F29D100D3279E /* ScoreDetailController.m */,
D091E66D283F29D100D3279E /* ScoreDetailController.m */,
D091E66F283F2E6F00D3279E /* ScoreDetailListController.h */,
D091E66F283F2E6F00D3279E /* ScoreDetailListController.h */,
D091E670283F2E6F00D3279E /* ScoreDetailListController.m */,
D091E670283F2E6F00D3279E /* ScoreDetailListController.m */,
D037C495284F4A22000F3089 /* SignTaskView.h */,
D037C496284F4A22000F3089 /* SignTaskView.m */,
D037C498284F4F0D000F3089 /* DailyTaskCell.h */,
D037C499284F4F0D000F3089 /* DailyTaskCell.m */,
D0D4107A2844B8DB00009638 /* DailyTaskController.h */,
D0D4107A2844B8DB00009638 /* DailyTaskController.h */,
D0D4107B2844B8DB00009638 /* DailyTaskController.m */,
D0D4107B2844B8DB00009638 /* DailyTaskController.m */,
D037C49B284F5DE8000F3089 /* DailyTaskSrollView.h */,
D037C49C284F5DE8000F3089 /* DailyTaskSrollView.m */,
D0D4107D2844D38400009638 /* RankModel.h */,
D0D4107D2844D38400009638 /* RankModel.h */,
D0D4107E2844D38400009638 /* RankModel.m */,
D0D4107E2844D38400009638 /* RankModel.m */,
D0BE536C2845A7AF007F15B3 /* SignModel.h */,
D0BE536C2845A7AF007F15B3 /* SignModel.h */,
...
@@ -1754,6 +1769,7 @@
...
@@ -1754,6 +1769,7 @@
isa = PBXSourcesBuildPhase;
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
buildActionMask = 2147483647;
files = (
files = (
D037C49D284F5DE8000F3089 /* DailyTaskSrollView.m in Sources */,
D09D0E9D280D73B6008DEDAB /* InviteController.m in Sources */,
D09D0E9D280D73B6008DEDAB /* InviteController.m in Sources */,
D0534F092835D90400F8892E /* DSNaviBarViewController.m in Sources */,
D0534F092835D90400F8892E /* DSNaviBarViewController.m in Sources */,
D04B3D9A27F6D4D90022F8DF /* LeadingController.m in Sources */,
D04B3D9A27F6D4D90022F8DF /* LeadingController.m in Sources */,
...
@@ -1834,6 +1850,7 @@
...
@@ -1834,6 +1850,7 @@
D0930F1B2801874B006B497A /* UINavigationController+Pop.m in Sources */,
D0930F1B2801874B006B497A /* UINavigationController+Pop.m in Sources */,
D0FAC662281BAACB00D4B859 /* YYAnimationImageView+Fix.m in Sources */,
D0FAC662281BAACB00D4B859 /* YYAnimationImageView+Fix.m in Sources */,
D08F79D9281A1838000D99DD /* UIView+Layout.m in Sources */,
D08F79D9281A1838000D99DD /* UIView+Layout.m in Sources */,
D037C497284F4A22000F3089 /* SignTaskView.m in Sources */,
D08F79D8281A1838000D99DD /* NSBundle+TZImagePicker.m in Sources */,
D08F79D8281A1838000D99DD /* NSBundle+TZImagePicker.m in Sources */,
D08F79E6281A198E000D99DD /* FeedImageCollectionCell.m in Sources */,
D08F79E6281A198E000D99DD /* FeedImageCollectionCell.m in Sources */,
D07DACA52810557D0067A1BF /* RSKInternalUtility.m in Sources */,
D07DACA52810557D0067A1BF /* RSKInternalUtility.m in Sources */,
...
@@ -1913,6 +1930,7 @@
...
@@ -1913,6 +1930,7 @@
D0A72E3F282B89AD00EED7BE /* DSHomeView.m in Sources */,
D0A72E3F282B89AD00EED7BE /* DSHomeView.m in Sources */,
D01814E8280020F900583D4E /* CWPageControl.m in Sources */,
D01814E8280020F900583D4E /* CWPageControl.m in Sources */,
D027EE3027FB52DA004BBA61 /* UIImage+Extras.m in Sources */,
D027EE3027FB52DA004BBA61 /* UIImage+Extras.m in Sources */,
D037C49A284F4F0D000F3089 /* DailyTaskCell.m in Sources */,
D0A7510E282E2FEF00589B0E /* NoisePlayView.m in Sources */,
D0A7510E282E2FEF00589B0E /* NoisePlayView.m in Sources */,
D08F79DD281A1838000D99DD /* TZImageManager.m in Sources */,
D08F79DD281A1838000D99DD /* TZImageManager.m in Sources */,
D0506B1828054ECD00229278 /* SafeHelperCollectionView.m in Sources */,
D0506B1828054ECD00229278 /* SafeHelperCollectionView.m in Sources */,
...
...
DreamSleep/DreamSleep/Basement/H5/DsWebController.m
查看文件 @
d21a6df
...
@@ -83,6 +83,11 @@
...
@@ -83,6 +83,11 @@
}
}
#pragma mark - WKNavigationDelegate
#pragma mark - WKNavigationDelegate
-
(
void
)
webView
:
(
WKWebView
*
)
webView
decidePolicyForNavigationAction
:
(
nonnull
WKNavigationAction
*
)
navigationAction
decisionHandler
:
(
nonnull
void
(
^
)(
WKNavigationActionPolicy
))
decisionHandler
{
DSLog
(
@"通用H5页面入口->跳转链接:%@"
,
navigationAction
.
request
.
URL
.
absoluteString
);
decisionHandler
(
WKNavigationActionPolicyAllow
);
}
-
(
void
)
webView
:
(
WKWebView
*
)
webView
didStartProvisionalNavigation
:
(
null_unspecified
WKNavigation
*
)
navigation
{
-
(
void
)
webView
:
(
WKWebView
*
)
webView
didStartProvisionalNavigation
:
(
null_unspecified
WKNavigation
*
)
navigation
{
[[
UIApplication
sharedApplication
]
setNetworkActivityIndicatorVisible
:
YES
];
[[
UIApplication
sharedApplication
]
setNetworkActivityIndicatorVisible
:
YES
];
}
}
...
...
DreamSleep/DreamSleep/Class/AISleepModule/AISleepCoachController.m
查看文件 @
d21a6df
...
@@ -92,7 +92,7 @@
...
@@ -92,7 +92,7 @@
#pragma mark - WKNavigationDelegate
#pragma mark - WKNavigationDelegate
-
(
void
)
webView
:
(
WKWebView
*
)
webView
decidePolicyForNavigationAction
:
(
nonnull
WKNavigationAction
*
)
navigationAction
decisionHandler
:
(
nonnull
void
(
^
)(
WKNavigationActionPolicy
))
decisionHandler
{
-
(
void
)
webView
:
(
WKWebView
*
)
webView
decidePolicyForNavigationAction
:
(
nonnull
WKNavigationAction
*
)
navigationAction
decisionHandler
:
(
nonnull
void
(
^
)(
WKNavigationActionPolicy
))
decisionHandler
{
NSString
*
url
=
navigationAction
.
request
.
URL
.
absoluteString
;
NSString
*
url
=
navigationAction
.
request
.
URL
.
absoluteString
;
DSLog
(
@"跳转链接:%@"
,
url
);
DSLog
(
@"
AI睡眠教练主页面入口->
跳转链接:%@"
,
url
);
if
([
url
isEqualToString
:
AICoachURL
])
{
if
([
url
isEqualToString
:
AICoachURL
])
{
decisionHandler
(
WKNavigationActionPolicyAllow
);
decisionHandler
(
WKNavigationActionPolicyAllow
);
...
...
DreamSleep/DreamSleep/Class/AISleepModule/RelaxTrainController.m
查看文件 @
d21a6df
...
@@ -75,7 +75,6 @@
...
@@ -75,7 +75,6 @@
#pragma mark - UIScrollViewDelegate
#pragma mark - UIScrollViewDelegate
-
(
void
)
scrollViewDidScroll
:
(
UIScrollView
*
)
scrollView
{
-
(
void
)
scrollViewDidScroll
:
(
UIScrollView
*
)
scrollView
{
CGFloat
offset
=
scrollView
.
contentOffset
.
y
;
CGFloat
offset
=
scrollView
.
contentOffset
.
y
;
if
(
offset
>=
self
.
lucencyView
.
contentSize
.
height
-
kScreenHeight
)
{
if
(
offset
>=
self
.
lucencyView
.
contentSize
.
height
-
kScreenHeight
)
{
self
.
dkBackBtn
.
hidden
=
YES
;
self
.
dkBackBtn
.
hidden
=
YES
;
self
.
dsNaviBar
.
alpha
=
1
;
self
.
dsNaviBar
.
alpha
=
1
;
...
@@ -83,7 +82,7 @@
...
@@ -83,7 +82,7 @@
self
.
cusTitleLab
.
hidden
=
YES
;
self
.
cusTitleLab
.
hidden
=
YES
;
self
.
isNeedUpdateStatusBarStyle
=
YES
;
self
.
isNeedUpdateStatusBarStyle
=
YES
;
}
}
if
(
offset
<=
-
kStatusBarHeight
)
{
if
(
offset
<=
0
)
{
self
.
dkBackBtn
.
hidden
=
NO
;
self
.
dkBackBtn
.
hidden
=
NO
;
self
.
dsNaviBar
.
alpha
=
0
;
self
.
dsNaviBar
.
alpha
=
0
;
self
.
titleLab
.
hidden
=
YES
;
self
.
titleLab
.
hidden
=
YES
;
...
@@ -123,6 +122,7 @@
...
@@ -123,6 +122,7 @@
CGFloat
bodyTopMargin
=
351
;
CGFloat
bodyTopMargin
=
351
;
CGFloat
bodyH
=
420
+
Bottom_SafeArea_Height
;
CGFloat
bodyH
=
420
+
Bottom_SafeArea_Height
;
_lucencyView
.
contentSize
=
CGSizeMake
(
kScreenWidth
,
bodyH
+
bodyTopMargin
);
_lucencyView
.
contentSize
=
CGSizeMake
(
kScreenWidth
,
bodyH
+
bodyTopMargin
);
_lucencyView
.
contentInsetAdjustmentBehavior
=
UIScrollViewContentInsetAdjustmentNever
;
}
}
return
_lucencyView
;
return
_lucencyView
;
}
}
...
...
DreamSleep/DreamSleep/Class/ProfileModule/ScoreTaskAI/DailyTaskCell.h
0 → 100644
查看文件 @
d21a6df
//
// DailyTaskCell.h
// DreamSleep
//
// Created by peter on 2022/6/7.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
/// 每日任务、新手任务cell
@interface
DailyTaskCell
:
UITableViewCell
@end
NS_ASSUME_NONNULL_END
DreamSleep/DreamSleep/Class/ProfileModule/ScoreTaskAI/DailyTaskCell.m
0 → 100644
查看文件 @
d21a6df
//
// DailyTaskCell.m
// DreamSleep
//
// Created by peter on 2022/6/7.
//
#import "DailyTaskCell.h"
@implementation
DailyTaskCell
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
{
if
(
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
])
{
self
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
}
return
self
;
}
@end
DreamSleep/DreamSleep/Class/ProfileModule/ScoreTaskAI/DailyTaskController.m
查看文件 @
d21a6df
...
@@ -7,9 +7,15 @@
...
@@ -7,9 +7,15 @@
#import "DailyTaskController.h"
#import "DailyTaskController.h"
#import "ScoreTaskRequestModel.h"
#import "ScoreTaskRequestModel.h"
#import "SignTaskView.h"
#import "DailyTaskCell.h"
#import "DailyTaskSrollView.h"
@interface
DailyTaskController
()
@interface
DailyTaskController
()
<
UIScrollViewDelegate
,
UITableViewDelegate
,
UITableViewDataSource
>
@property
(
nonatomic
,
strong
)
DailyTaskSrollView
*
dtSrollView
;
@property
(
nonatomic
,
strong
)
UIImageView
*
bgIV
;
@property
(
nonatomic
,
strong
)
UITableView
*
taskTableView
;
@property
(
nonatomic
,
strong
)
SignTaskView
*
signTaskView
;
@end
@end
@implementation
DailyTaskController
@implementation
DailyTaskController
...
@@ -17,10 +23,7 @@
...
@@ -17,10 +23,7 @@
-
(
void
)
viewDidLoad
{
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[
super
viewDidLoad
];
self
.
view
.
backgroundColor
=
DSWhite
;
[
self
initUI
];
self
.
naviBgColor
=
DSClearColor
;
self
.
naviBarAlpha
=
1
.
0
;
[
self
.
dsNaviBar
addSubview
:
self
.
backBtn
];
[
ScoreTaskRequestModel
queryUserSignListWithCompletion
:
^
(
ScoreTaskRequestModel
*
_Nonnull
requestModel
)
{
[
ScoreTaskRequestModel
queryUserSignListWithCompletion
:
^
(
ScoreTaskRequestModel
*
_Nonnull
requestModel
)
{
if
(
requestModel
.
resCode
==
DSResCodeSuccess
)
{
if
(
requestModel
.
resCode
==
DSResCodeSuccess
)
{
...
@@ -35,4 +38,101 @@
...
@@ -35,4 +38,101 @@
}];
}];
}
}
-
(
void
)
initUI
{
self
.
view
.
dk_backgroundColorPicker
=
DKColorPickerWithKey
(
VCViewBG
);
self
.
naviBgColor
=
DSClearColor
;
self
.
naviBarAlpha
=
1
.
0
;
[
self
.
dsNaviBar
addSubview
:
self
.
backBtn
];
[
self
.
view
insertSubview
:
self
.
dtSrollView
belowSubview
:
self
.
dsNaviBar
];
[
self
.
dtSrollView
addSubview
:
self
.
bgIV
];
[
self
.
dtSrollView
addSubview
:
self
.
taskTableView
];
[
self
.
dtSrollView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
edges
.
equalTo
(
self
.
view
);
}];
self
.
taskTableView
.
height
=
self
.
signTaskView
.
height
+
20
*
50
+
30
;
self
.
dtSrollView
.
contentSize
=
CGSizeMake
(
kScreenWidth
,
self
.
bgIV
.
height
+
self
.
taskTableView
.
height
);
}
#pragma mark - UIScrollViewDelegate
-
(
void
)
scrollViewDidScroll
:
(
UIScrollView
*
)
scrollView
{
CGFloat
offsetY
=
scrollView
.
contentOffset
.
y
;
DSLog
(
@"offsetY:%f"
,
scrollView
.
contentOffset
.
y
);
if
(
scrollView
==
self
.
dtSrollView
)
{
self
.
dtSrollView
.
bounces
=
offsetY
<=
0
?
NO
:
YES
;
// if (offsetY == 0) {
// self.taskTableView.scrollEnabled = YES;
// self.dtSrollView.scrollEnabled = NO;
// }
}
else
{
// if (offsetY > 0) {
// self.taskTableView.scrollEnabled = NO;
// self.dtSrollView.scrollEnabled = YES;
// // 修正
// self.taskTableView.contentOffset = CGPointMake(0, 0);
// }
}
}
#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
;
}
#pragma mark - lazy
-
(
DailyTaskSrollView
*
)
dtSrollView
{
if
(
!
_dtSrollView
)
{
_dtSrollView
=
[
DailyTaskSrollView
new
];
_dtSrollView
.
showsVerticalScrollIndicator
=
NO
;
_dtSrollView
.
contentInsetAdjustmentBehavior
=
UIScrollViewContentInsetAdjustmentNever
;
_dtSrollView
.
delegate
=
self
;
}
return
_dtSrollView
;
}
-
(
UIImageView
*
)
bgIV
{
if
(
!
_bgIV
)
{
_bgIV
=
[[
UIImageView
alloc
]
dk_initWithImagePicker
:
DKImagePickerWithNames
(
@"bg_rw"
,
@"dk_bg_rw"
,
@"dk_bg_rw"
)];
_bgIV
.
frame
=
CGRectMake
(
0
,
0
,
kScreenWidth
,
kScreenWidth
*
300
/
375
.
0
);
}
return
_bgIV
;
}
-
(
UITableView
*
)
taskTableView
{
if
(
!
_taskTableView
)
{
_taskTableView
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectMake
(
15
,
CGRectGetMaxY
(
self
.
bgIV
.
frame
),
kScreenWidth
-
30
,
500
)
style
:
UITableViewStyleGrouped
];
_taskTableView
.
backgroundColor
=
DSClearColor
;
[
_taskTableView
debugViewShowBorderWithColor
:
DSBlack
];
_taskTableView
.
delegate
=
self
;
_taskTableView
.
dataSource
=
self
;
_taskTableView
.
tableHeaderView
=
self
.
signTaskView
;
_taskTableView
.
rowHeight
=
50
;
_taskTableView
.
showsVerticalScrollIndicator
=
NO
;
_taskTableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
[
_taskTableView
registerClass
:[
DailyTaskCell
class
]
forCellReuseIdentifier
:
NSStringFromClass
([
DailyTaskCell
class
])];
}
return
_taskTableView
;
}
-
(
SignTaskView
*
)
signTaskView
{
if
(
!
_signTaskView
)
{
_signTaskView
=
[[
SignTaskView
alloc
]
initWithFrame
:
CGRectMake
(
15
,
CGRectGetMaxY
(
self
.
bgIV
.
frame
),
kScreenWidth
-
30
,
186
)];
}
return
_signTaskView
;
}
@end
@end
DreamSleep/DreamSleep/Class/ProfileModule/ScoreTaskAI/DailyTaskSrollView.h
0 → 100644
查看文件 @
d21a6df
//
// DailyTaskSrollView.h
// DreamSleep
//
// Created by peter on 2022/6/7.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface
DailyTaskSrollView
:
UIScrollView
@end
NS_ASSUME_NONNULL_END
DreamSleep/DreamSleep/Class/ProfileModule/ScoreTaskAI/DailyTaskSrollView.m
0 → 100644
查看文件 @
d21a6df
//
// DailyTaskSrollView.m
// DreamSleep
//
// Created by peter on 2022/6/7.
//
#import "DailyTaskSrollView.h"
@implementation
DailyTaskSrollView
-
(
BOOL
)
gestureRecognizer
:(
UIGestureRecognizer
*
)
gestureRecognizer
shouldRecognizeSimultaneouslyWithGestureRecognizer
:(
UIGestureRecognizer
*
)
otherGestureRecogn
{
DSLog
(
@"哈哈哈哈..."
);
return
YES
;
}
@end
DreamSleep/DreamSleep/Class/ProfileModule/ScoreTaskAI/SignTaskView.h
0 → 100644
查看文件 @
d21a6df
//
// SignTaskView.h
// DreamSleep
//
// Created by peter on 2022/6/7.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
/// 签到任务视图
@interface
SignTaskView
:
UIView
@end
NS_ASSUME_NONNULL_END
DreamSleep/DreamSleep/Class/ProfileModule/ScoreTaskAI/SignTaskView.m
0 → 100644
查看文件 @
d21a6df
//
// SignTaskView.m
// DreamSleep
//
// Created by peter on 2022/6/7.
//
#import "SignTaskView.h"
@implementation
SignTaskView
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
if
(
self
=
[
super
initWithFrame
:
frame
])
{
self
.
dk_backgroundColorPicker
=
DKColorPickerWithKey
(
TabBarBG
);
[
self
cornerRadius
:
24
.
0
];
}
return
self
;
}
@end
DreamSleep/DreamSleep/Resource/Assets.xcassets/ScoreTask/bg_rw.imageset/Contents.json
0 → 100644
查看文件 @
d21a6df
{
"images"
:
[
{
"filename"
:
"bg_rw.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"bg_rw@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"bg_rw@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
DreamSleep/DreamSleep/Resource/Assets.xcassets/ScoreTask/bg_rw.imageset/bg_rw.png
0 → 100644
查看文件 @
d21a6df
51.8 KB
DreamSleep/DreamSleep/Resource/Assets.xcassets/ScoreTask/bg_rw.imageset/bg_rw@2x.png
0 → 100644
查看文件 @
d21a6df
203.1 KB
DreamSleep/DreamSleep/Resource/Assets.xcassets/ScoreTask/bg_rw.imageset/bg_rw@3x.png
0 → 100644
查看文件 @
d21a6df
554.4 KB
DreamSleep/DreamSleep/Resource/Assets.xcassets/ScoreTask/dk_bg_rw.imageset/Contents.json
0 → 100644
查看文件 @
d21a6df
{
"images"
:
[
{
"filename"
:
"dk_bg_rw.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"dk_bg_rw@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"dk_bg_rw@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
DreamSleep/DreamSleep/Resource/Assets.xcassets/ScoreTask/dk_bg_rw.imageset/dk_bg_rw.png
0 → 100644
查看文件 @
d21a6df
50.8 KB
DreamSleep/DreamSleep/Resource/Assets.xcassets/ScoreTask/dk_bg_rw.imageset/dk_bg_rw@2x.png
0 → 100644
查看文件 @
d21a6df
192.9 KB
DreamSleep/DreamSleep/Resource/Assets.xcassets/ScoreTask/dk_bg_rw.imageset/dk_bg_rw@3x.png
0 → 100644
查看文件 @
d21a6df
536.9 KB
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论