Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
陈高翔
/
DreamSleep-iOS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6666520c
由
cgx
编写于
2022-04-14 17:02:10 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
导航栏白天夜间模式
1 个父辈
3588475b
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
111 行增加
和
124 行删除
DreamSleep/DreamSleep.xcodeproj/project.pbxproj
DreamSleep/DreamSleep/HomeModule/Home/Controller/HomeViewController.m
DreamSleep/DreamSleep/PrivacyPolicy/PrivacyViewController.m
DreamSleep/DreamSleep/Profile/Profile.storyboard
DreamSleep/DreamSleep/Profile/ProfileController.m
DreamSleep/DreamSleep/TmpViewController.h → DreamSleep/DreamSleep/Profile/SystemSetController.h
DreamSleep/DreamSleep/Profile/SystemSetController.m
DreamSleep/DreamSleep/TmpViewController.m
DreamSleep/DreamSleep/ViewController.h
DreamSleep/DreamSleep/ViewController.m
DreamSleep/DreamSleep.xcodeproj/project.pbxproj
查看文件 @
6666520
...
...
@@ -33,13 +33,11 @@
D0506B1828054ECD00229278 /* SafeHelperCollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = D0506B1728054ECD00229278 /* SafeHelperCollectionView.m */; };
D0506B1B2805500E00229278 /* SafeHelperCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D0506B1A2805500E00229278 /* SafeHelperCollectionViewCell.m */; };
D070509A28071BAF006D72E1 /* DSNetworkTool.m in Sources */ = {isa = PBXBuildFile; fileRef = D070509928071BAF006D72E1 /* DSNetworkTool.m */; };
D076C14327F49DC000340B46 /* TmpViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D076C14227F49DC000340B46 /* TmpViewController.m */; };
D07F9DE927F4683B0036372F /* DKColorTable.txt in Resources */ = {isa = PBXBuildFile; fileRef = D07F9DE827F4683B0036372F /* DKColorTable.txt */; };
D0930F122801124E006B497A /* BaseNaviController.m in Sources */ = {isa = PBXBuildFile; fileRef = D0930F112801124E006B497A /* BaseNaviController.m */; };
D0930F1A2801874B006B497A /* UIViewController+Swizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = D0930F152801874B006B497A /* UIViewController+Swizzling.m */; };
D0930F1B2801874B006B497A /* UINavigationController+Pop.m in Sources */ = {isa = PBXBuildFile; fileRef = D0930F182801874B006B497A /* UINavigationController+Pop.m */; };
D0B5ECA627F2D9DE003EDFE3 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D0B5ECA527F2D9DE003EDFE3 /* AppDelegate.m */; };
D0B5ECAC27F2D9DE003EDFE3 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D0B5ECAB27F2D9DE003EDFE3 /* ViewController.m */; };
D0B5ECAF27F2D9DE003EDFE3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D0B5ECAD27F2D9DE003EDFE3 /* Main.storyboard */; };
D0B5ECB127F2D9E0003EDFE3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D0B5ECB027F2D9E0003EDFE3 /* Assets.xcassets */; };
D0B5ECB427F2D9E0003EDFE3 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D0B5ECB227F2D9E0003EDFE3 /* LaunchScreen.storyboard */; };
...
...
@@ -67,6 +65,7 @@
D0E65FFF2807AC5E006562F2 /* DSProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = D0E65FFE2807AC5E006562F2 /* DSProgressHUD.m */; };
D0E660022807B5AE006562F2 /* SafeSleepRequestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D0E660002807B5AE006562F2 /* SafeSleepRequestModel.m */; };
D0E660052807D02C006562F2 /* UserRequestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D0E660042807D02C006562F2 /* UserRequestModel.m */; };
D0E6600828080F97006562F2 /* SystemSetController.m in Sources */ = {isa = PBXBuildFile; fileRef = D0E6600728080F97006562F2 /* SystemSetController.m */; };
D0E9408927FE96A900D57495 /* libWeChatSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D0E9408727FE96A900D57495 /* libWeChatSDK.a */; settings = {ATTRIBUTES = (Required, ); }; };
D0F808F52803D4E70097899F /* Track.m in Sources */ = {isa = PBXBuildFile; fileRef = D0F808F32803D4E70097899F /* Track.m */; };
D0F808FE280421C20097899F /* ThreeMinuteController.m in Sources */ = {isa = PBXBuildFile; fileRef = D0F808FD280421C20097899F /* ThreeMinuteController.m */; };
...
...
@@ -126,8 +125,6 @@
D0506B1A2805500E00229278 /* SafeHelperCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SafeHelperCollectionViewCell.m; sourceTree = "<group>"; };
D070509828071BAF006D72E1 /* DSNetworkTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DSNetworkTool.h; sourceTree = "<group>"; };
D070509928071BAF006D72E1 /* DSNetworkTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DSNetworkTool.m; sourceTree = "<group>"; };
D076C14127F49DC000340B46 /* TmpViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TmpViewController.h; sourceTree = "<group>"; };
D076C14227F49DC000340B46 /* TmpViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TmpViewController.m; sourceTree = "<group>"; };
D07F9D0627F45CB20036372F /* DKNightVersion.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = DKNightVersion.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D07F9DE827F4683B0036372F /* DKColorTable.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DKColorTable.txt; sourceTree = "<group>"; };
D0930F102801124E006B497A /* BaseNaviController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BaseNaviController.h; sourceTree = "<group>"; };
...
...
@@ -140,8 +137,6 @@
D0B5ECA127F2D9DE003EDFE3 /* DreamSleepDev.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DreamSleepDev.app; sourceTree = BUILT_PRODUCTS_DIR; };
D0B5ECA427F2D9DE003EDFE3 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
D0B5ECA527F2D9DE003EDFE3 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
D0B5ECAA27F2D9DE003EDFE3 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
D0B5ECAB27F2D9DE003EDFE3 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
D0B5ECAE27F2D9DE003EDFE3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
D0B5ECB027F2D9E0003EDFE3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
D0B5ECB327F2D9E0003EDFE3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
...
...
@@ -190,6 +185,8 @@
D0E660012807B5AE006562F2 /* SafeSleepRequestModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SafeSleepRequestModel.h; sourceTree = "<group>"; };
D0E660032807D02C006562F2 /* UserRequestModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserRequestModel.h; sourceTree = "<group>"; };
D0E660042807D02C006562F2 /* UserRequestModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UserRequestModel.m; sourceTree = "<group>"; };
D0E6600628080F97006562F2 /* SystemSetController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SystemSetController.h; sourceTree = "<group>"; };
D0E6600728080F97006562F2 /* SystemSetController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SystemSetController.m; sourceTree = "<group>"; };
D0E9408327FE96A900D57495 /* WXApi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXApi.h; sourceTree = "<group>"; };
D0E9408427FE96A900D57495 /* WXApiObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXApiObject.h; sourceTree = "<group>"; };
D0E9408627FE96A900D57495 /* WechatAuthSDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WechatAuthSDK.h; sourceTree = "<group>"; };
...
...
@@ -357,6 +354,8 @@
D04B3DBF27F6F82D0022F8DF /* ProfileController.m */,
D0E660032807D02C006562F2 /* UserRequestModel.h */,
D0E660042807D02C006562F2 /* UserRequestModel.m */,
D0E6600628080F97006562F2 /* SystemSetController.h */,
D0E6600728080F97006562F2 /* SystemSetController.m */,
);
path = Profile;
sourceTree = "<group>";
...
...
@@ -407,10 +406,6 @@
D027EE2A27FB5285004BBA61 /* Category */,
D04567A827F6D018009F0A82 /* Resource */,
D0C50B4327FD3DE800DC68F0 /* PrivacyPolicy */,
D0B5ECAA27F2D9DE003EDFE3 /* ViewController.h */,
D0B5ECAB27F2D9DE003EDFE3 /* ViewController.m */,
D076C14127F49DC000340B46 /* TmpViewController.h */,
D076C14227F49DC000340B46 /* TmpViewController.m */,
);
path = DreamSleep;
sourceTree = "<group>";
...
...
@@ -456,12 +451,12 @@
D0E65FF32807A654006562F2 /* HYBUnicodeReadable */ = {
isa = PBXGroup;
children = (
D0E65FF42807A654006562F2 /* NSArray+HYBUnicodeReadable.m */,
D0E65FF52807A654006562F2 /* NSDictionary+HYBUnicodeReadable.m */,
D0E65FF92807A654006562F2 /* NSSet+HYBUnicodeReadable.h */,
D0E65FF62807A654006562F2 /* NSSet+HYBUnicodeReadable.m */,
D0E65FF72807A654006562F2 /* NSArray+HYBUnicodeReadable.h */,
D0E65FF42807A654006562F2 /* NSArray+HYBUnicodeReadable.m */,
D0E65FF82807A654006562F2 /* NSDictionary+HYBUnicodeReadable.h */,
D0E65FF
92807A654006562F2 /* NSSet+HYBUnicodeReadable.h
*/,
D0E65FF
52807A654006562F2 /* NSDictionary+HYBUnicodeReadable.m
*/,
);
path = HYBUnicodeReadable;
sourceTree = "<group>";
...
...
@@ -469,10 +464,10 @@
D0E9408127FE961300D57495 /* Vendors */ = {
isa = PBXGroup;
children = (
D01814CA27FFCBAF00583D4E /* CWCarousel */,
D01814D927FFD91100583D4E /* DataSource */,
D0
E9408227FE96A900D57495 /* WechatOpenSDK_1.9.2_NoPay
*/,
D0
1814CA27FFCBAF00583D4E /* CWCarousel
*/,
D0E65FF32807A654006562F2 /* HYBUnicodeReadable */,
D0E9408227FE96A900D57495 /* WechatOpenSDK_1.9.2_NoPay */,
);
path = Vendors;
sourceTree = "<group>";
...
...
@@ -697,7 +692,6 @@
buildActionMask = 2147483647;
files = (
D04B3D9A27F6D4D90022F8DF /* LeadingController.m in Sources */,
D0B5ECAC27F2D9DE003EDFE3 /* ViewController.m in Sources */,
D0B5ECD827F2F1B0003EDFE3 /* ServerAPIUtil.m in Sources */,
D0B5ECA627F2D9DE003EDFE3 /* AppDelegate.m in Sources */,
D0E65FFB2807A654006562F2 /* NSDictionary+HYBUnicodeReadable.m in Sources */,
...
...
@@ -713,6 +707,7 @@
D0C50B3F27FD381000DC68F0 /* UIView+Extras.m in Sources */,
D0E65FFF2807AC5E006562F2 /* DSProgressHUD.m in Sources */,
D0E660022807B5AE006562F2 /* SafeSleepRequestModel.m in Sources */,
D0E6600828080F97006562F2 /* SystemSetController.m in Sources */,
D04B3DBB27F6F7940022F8DF /* AISleepCoachController.m in Sources */,
D027EE2627FB3DC0004BBA61 /* NetLoadingStateView.m in Sources */,
D0C09EE028007E5F00709D4C /* BreatheController.m in Sources */,
...
...
@@ -723,7 +718,6 @@
D0506B1528051ED400229278 /* SafeSleepModel.m in Sources */,
D01814D527FFCCFA00583D4E /* HomeTableView.m in Sources */,
D0F80907280431100097899F /* UILabel+Extras.m in Sources */,
D076C14327F49DC000340B46 /* TmpViewController.m in Sources */,
D04B3DAC27F6EEB50022F8DF /* DSTabBarController.m in Sources */,
D0C50B4F27FD832300DC68F0 /* LeadView.m in Sources */,
D01814EB28002A8200583D4E /* DsMiddleView.m in Sources */,
...
...
DreamSleep/DreamSleep/HomeModule/Home/Controller/HomeViewController.m
查看文件 @
6666520
...
...
@@ -27,9 +27,9 @@
self
.
navigationItem
.
leftBarButtonItem
=
leftItem
;
}
#pragma mark - 导航栏日间模式
#pragma mark - 导航栏日间
、黑夜
模式
-
(
NaviStyle
)
navigationBarStyle
{
return
NaviStyleLight
;
return
[
self
.
dk_manager
.
themeVersion
isEqualToString
:
DKThemeVersionNormal
]
?
NaviStyleLight
:
NaviStyleDark
;
}
-
(
HomeTableView
*
)
homeTV
{
...
...
DreamSleep/DreamSleep/PrivacyPolicy/PrivacyViewController.m
查看文件 @
6666520
...
...
@@ -16,6 +16,8 @@
@property
(
nonatomic
,
copy
)
NSURL
*
link
;
@property
(
nonatomic
,
assign
)
BOOL
isDetail
;
@property
(
nonatomic
,
strong
)
WKWebView
*
webView
;
// 黑夜模式遮罩(到时候提取出来,全局通用)
@property
(
nonatomic
,
strong
)
UIView
*
darkMaskView
;
@end
@implementation
PrivacyViewController
...
...
@@ -40,6 +42,12 @@
}
else
{
[
self
showPrivacyView
];
}
self
.
darkMaskView
.
hidden
=
!
[
self
.
dk_manager
.
themeVersion
isEqualToString
:
DKThemeVersionNight
];
}
-
(
void
)
dealloc
{
[
self
.
maskView
removeFromSuperview
];
}
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
...
...
@@ -78,4 +86,15 @@
return
_webView
;
}
-
(
UIView
*
)
darkMaskView
{
if
(
!
_darkMaskView
)
{
_darkMaskView
=
[[
UIView
alloc
]
initWithFrame
:[
UIScreen
mainScreen
].
bounds
];
_darkMaskView
.
backgroundColor
=
ColorFromHex
(
0x6B7485
);
_darkMaskView
.
alpha
=
.
5
;
_darkMaskView
.
userInteractionEnabled
=
NO
;
[
self
.
view
addSubview
:
_darkMaskView
];
}
return
_darkMaskView
;
}
@end
DreamSleep/DreamSleep/Profile/Profile.storyboard
查看文件 @
6666520
...
...
@@ -11,7 +11,7 @@
<!--我的-->
<scene
sceneID=
"XXm-nW-BLl"
>
<objects>
<navigationController
automaticallyAdjustsScrollViewInsets=
"NO"
id=
"z46-F3-9B2"
sceneMemberID=
"viewController"
>
<navigationController
automaticallyAdjustsScrollViewInsets=
"NO"
id=
"z46-F3-9B2"
customClass=
"BaseNaviController"
sceneMemberID=
"viewController"
>
<tabBarItem
key=
"tabBarItem"
title=
"我的"
image=
"profile"
selectedImage=
"profile_selected"
id=
"q0K-3e-nOn"
/>
<toolbarItems/>
<navigationBar
key=
"navigationBar"
contentMode=
"scaleToFill"
id=
"kJv-b2-G2C"
>
...
...
DreamSleep/DreamSleep/Profile/ProfileController.m
查看文件 @
6666520
...
...
@@ -6,9 +6,10 @@
//
#import "ProfileController.h"
#import "SystemSetController.h"
@interface
ProfileController
()
@property
(
nonatomic
,
strong
)
NSArray
*
tmpDatas
;
@end
@implementation
ProfileController
...
...
@@ -16,35 +17,43 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
navigationItem
.
title
=
@"我的"
;
self
.
tableView
.
dk_backgroundColorPicker
=
DKColorPickerWithKey
(
VCViewBG
);
self
.
tmpDatas
=
@[
@"注册登录信息"
,
@"意见反馈"
,
@"系统设置"
,
@"邀请好友"
,
@"关于我们"
,
@"前往小程序"
,
@"关注公众号"
,
@"添加客服微信"
,
@"失眠的认知行为疗法"
];
}
#pragma mark - 导航栏日间、黑夜模式
-
(
NaviStyle
)
navigationBarStyle
{
return
NaviStyleDefault
;
}
#pragma mark - Table view data source
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
1
;
return
self
.
tmpDatas
.
count
;
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"profileCell"
forIndexPath
:
indexPath
];
cell
.
dk_backgroundColorPicker
=
DKColorPickerWithKey
(
VCViewBG
);
cell
.
textLabel
.
text
=
self
.
tmpDatas
[
indexPath
.
row
];
cell
.
textLabel
.
dk_textColorPicker
=
DKColorPickerWithKey
(
TEXT
);
cell
.
accessoryType
=
UITableViewCellAccessoryDisclosureIndicator
;
return
cell
;
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
// 模拟切换黑夜模式
if
([
self
.
dk_manager
.
themeVersion
isEqualToString
:
DKThemeVersionNight
])
{
self
.
dk_manager
.
themeVersion
=
DKThemeVersionNormal
;
}
else
{
self
.
dk_manager
.
themeVersion
=
DKThemeVersionNight
;
}
}
/*
#pragma mark - Navigation
[
tableView
deselectRowAtIndexPath
:
indexPath
animated
:
YES
];
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
switch
(
indexPath
.
row
)
{
case
2
:
// 系统设置入口
{
SystemSetController
*
sysVC
=
[
SystemSetController
new
];
[
self
.
navigationController
pushViewController
:
sysVC
animated
:
YES
];
}
break
;
default
:
break
;
}
}
*/
@end
DreamSleep/DreamSleep/
TmpView
Controller.h
→
DreamSleep/DreamSleep/
Profile/SystemSet
Controller.h
查看文件 @
6666520
//
//
TmpView
Controller.h
//
SystemSet
Controller.h
// DreamSleep
//
// Created by peter on 2022/
3/30
.
// Created by peter on 2022/
4/14
.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface
TmpViewController
:
UIViewController
/// 系统设置
@interface
SystemSetController
:
UIViewController
@end
...
...
DreamSleep/DreamSleep/Profile/SystemSetController.m
0 → 100644
查看文件 @
6666520
//
// SystemSetController.m
// DreamSleep
//
// Created by peter on 2022/4/14.
//
#import "SystemSetController.h"
#import "PrivacyViewController.h"
@interface
SystemSetController
()
@end
@implementation
SystemSetController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
navigationItem
.
title
=
@"系统设置"
;
self
.
view
.
dk_backgroundColorPicker
=
DKColorPickerWithKey
(
VCViewBG
);
UIButton
*
btn
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
20
,
100
,
100
,
40
)];
[
btn
setTitle
:
@"用户协议"
forState
:
UIControlStateNormal
];
[
btn
setTitleColor
:
DSRed
forState
:
UIControlStateNormal
];
[
btn
addTarget
:
self
action
:
@selector
(
privicyAction
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn
];
}
-
(
void
)
privicyAction
{
[
self
.
navigationController
pushViewController
:[[
PrivacyViewController
alloc
]
initWithTitle
:
@"用户协议"
link
:[
NSURL
URLWithString
:
UserServiceAgreement
]
isDetail
:
YES
]
animated
:
YES
];
}
-
(
void
)
touchesBegan
:
(
NSSet
<
UITouch
*>
*
)
touches
withEvent
:
(
UIEvent
*
)
event
{
// 模拟切换黑夜模式
if
([
self
.
dk_manager
.
themeVersion
isEqualToString
:
DKThemeVersionNight
])
{
self
.
dk_manager
.
themeVersion
=
DKThemeVersionNormal
;
}
else
{
self
.
dk_manager
.
themeVersion
=
DKThemeVersionNight
;
}
}
#pragma mark - 导航栏日间、黑夜模式
-
(
NaviStyle
)
navigationBarStyle
{
return
NaviStyleDefault
;
}
@end
DreamSleep/DreamSleep/TmpViewController.m
deleted
100644 → 0
查看文件 @
3588475
//
// TmpViewController.m
// DreamSleep
//
// Created by peter on 2022/3/30.
//
#import "TmpViewController.h"
@interface
TmpViewController
()
@end
@implementation
TmpViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
}
-
(
void
)
touchesBegan
:
(
NSSet
<
UITouch
*>
*
)
touches
withEvent
:
(
UIEvent
*
)
event
{
DSLog
(
@"11111"
);
}
@end
DreamSleep/DreamSleep/ViewController.h
deleted
100644 → 0
查看文件 @
3588475
//
// ViewController.h
// DreamSleep
//
// Created by peter on 2022/3/29.
//
#import <UIKit/UIKit.h>
@interface
ViewController
:
UIViewController
@end
DreamSleep/DreamSleep/ViewController.m
deleted
100644 → 0
查看文件 @
3588475
//
// ViewController.m
// DreamSleep
//
// Created by peter on 2022/3/29.
//
#import "ViewController.h"
#import <DKNightVersion/DKNightVersion.h>
#import "TmpViewController.h"
@interface
ViewController
()
@end
@implementation
ViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
view
.
dk_backgroundColorPicker
=
DKColorPickerWithKey
(
BG
);
DSKeyWindow
.
backgroundColor
=
DSRed
;
}
-
(
IBAction
)
changeAction
:
(
id
)
sender
{
if
([
self
.
dk_manager
.
themeVersion
isEqualToString
:
DKThemeVersionNight
])
{
[
self
.
dk_manager
dawnComing
];
}
else
if
([
self
.
dk_manager
.
themeVersion
isEqualToString
:
DKThemeVersionNormal
])
{
self
.
dk_manager
.
themeVersion
=
@"RED"
;
}
else
{
[
self
.
dk_manager
nightFalling
];
}
}
-
(
IBAction
)
jumpAction
:
(
id
)
sender
{
TmpViewController
*
vc
=
[
TmpViewController
new
];
vc
.
view
.
dk_backgroundColorPicker
=
DKColorPickerWithKey
(
BG
);
[
self
presentViewController
:
vc
animated
:
YES
completion
:
nil
];
}
-
(
void
)
touchesBegan
:
(
NSSet
<
UITouch
*>
*
)
touches
withEvent
:
(
UIEvent
*
)
event
{
DSLog
(
@"2222"
);
}
@end
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论