Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
陈高翔
/
DreamSleep-iOS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0fb14af2
由
cgx
编写于
2022-04-22 08:55:27 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
修复弹框点击不消失bug
1 个父辈
037feb51
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
47 行增加
和
6 行删除
DreamSleep/DreamSleep.xcodeproj/project.pbxproj
DreamSleep/DreamSleep/Launcher/zh-Hans.lproj/LaunchScreen.strings
DreamSleep/DreamSleep/Main/zh-Hans.lproj/Main.strings
DreamSleep/DreamSleep/Profile/Account/CloseAlertView.m
DreamSleep/DreamSleep/Profile/Account/PhotoAlertView.m
DreamSleep/DreamSleep/Profile/InviteController.m
DreamSleep/DreamSleep.xcodeproj/project.pbxproj
查看文件 @
0fb14af
...
@@ -282,6 +282,8 @@
...
@@ -282,6 +282,8 @@
D0CFD3CC27FB3B910002982B /* launcher@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "launcher@2x.png"; sourceTree = "<group>"; };
D0CFD3CC27FB3B910002982B /* launcher@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "launcher@2x.png"; sourceTree = "<group>"; };
D0CFD3CD27FB3B910002982B /* launcher@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "launcher@3x.png"; sourceTree = "<group>"; };
D0CFD3CD27FB3B910002982B /* launcher@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "launcher@3x.png"; sourceTree = "<group>"; };
D0CFD3CE27FB3B920002982B /* launcher.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = launcher.png; sourceTree = "<group>"; };
D0CFD3CE27FB3B920002982B /* launcher.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = launcher.png; sourceTree = "<group>"; };
D0D7480328118D0B00036379 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = "<group>"; };
D0D7480428118D0B00036379 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.strings"; sourceTree = "<group>"; };
D0E65FF42807A654006562F2 /* NSArray+HYBUnicodeReadable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+HYBUnicodeReadable.m"; sourceTree = "<group>"; };
D0E65FF42807A654006562F2 /* NSArray+HYBUnicodeReadable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+HYBUnicodeReadable.m"; sourceTree = "<group>"; };
D0E65FF52807A654006562F2 /* NSDictionary+HYBUnicodeReadable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+HYBUnicodeReadable.m"; sourceTree = "<group>"; };
D0E65FF52807A654006562F2 /* NSDictionary+HYBUnicodeReadable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+HYBUnicodeReadable.m"; sourceTree = "<group>"; };
D0E65FF62807A654006562F2 /* NSSet+HYBUnicodeReadable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSSet+HYBUnicodeReadable.m"; sourceTree = "<group>"; };
D0E65FF62807A654006562F2 /* NSSet+HYBUnicodeReadable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSSet+HYBUnicodeReadable.m"; sourceTree = "<group>"; };
...
@@ -888,6 +890,7 @@
...
@@ -888,6 +890,7 @@
knownRegions = (
knownRegions = (
en,
en,
Base,
Base,
"zh-Hans",
);
);
mainGroup = D0B5EC9827F2D9DE003EDFE3;
mainGroup = D0B5EC9827F2D9DE003EDFE3;
productRefGroup = D0B5ECA227F2D9DE003EDFE3 /* Products */;
productRefGroup = D0B5ECA227F2D9DE003EDFE3 /* Products */;
...
@@ -1058,6 +1061,7 @@
...
@@ -1058,6 +1061,7 @@
isa = PBXVariantGroup;
isa = PBXVariantGroup;
children = (
children = (
D0B5ECAE27F2D9DE003EDFE3 /* Base */,
D0B5ECAE27F2D9DE003EDFE3 /* Base */,
D0D7480328118D0B00036379 /* zh-Hans */,
);
);
name = Main.storyboard;
name = Main.storyboard;
sourceTree = "<group>";
sourceTree = "<group>";
...
@@ -1066,6 +1070,7 @@
...
@@ -1066,6 +1070,7 @@
isa = PBXVariantGroup;
isa = PBXVariantGroup;
children = (
children = (
D0B5ECB327F2D9E0003EDFE3 /* Base */,
D0B5ECB327F2D9E0003EDFE3 /* Base */,
D0D7480428118D0B00036379 /* zh-Hans */,
);
);
name = LaunchScreen.storyboard;
name = LaunchScreen.storyboard;
sourceTree = "<group>";
sourceTree = "<group>";
...
@@ -1078,6 +1083,7 @@
...
@@ -1078,6 +1083,7 @@
baseConfigurationReference = D0B5ECC027F2E217003EDFE3 /* Debug.xcconfig */;
baseConfigurationReference = D0B5ECC027F2E217003EDFE3 /* Debug.xcconfig */;
buildSettings = {
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
...
@@ -1138,6 +1144,7 @@
...
@@ -1138,6 +1144,7 @@
baseConfigurationReference = D0B5ECC427F2E27B003EDFE3 /* Release.xcconfig */;
baseConfigurationReference = D0B5ECC427F2E27B003EDFE3 /* Release.xcconfig */;
buildSettings = {
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
...
@@ -1315,6 +1322,7 @@
...
@@ -1315,6 +1322,7 @@
isa = XCBuildConfiguration;
isa = XCBuildConfiguration;
buildSettings = {
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
...
...
DreamSleep/DreamSleep/Launcher/zh-Hans.lproj/LaunchScreen.strings
0 → 100644
查看文件 @
0fb14af
DreamSleep/DreamSleep/Main/zh-Hans.lproj/Main.strings
0 → 100644
查看文件 @
0fb14af
/* Class = "UITabBarItem"; title = "我的"; ObjectID = "GRP-mg-DTk"; */
"GRP-mg-DTk.title" = "我的";
/* Class = "UITabBarItem"; title = "首页"; ObjectID = "Smw-jw-8ah"; */
"Smw-jw-8ah.title" = "首页";
/* Class = "UITabBarItem"; title = "AI睡眠教练"; ObjectID = "hhA-gt-gs3"; */
"hhA-gt-gs3.title" = "AI睡眠教练";
DreamSleep/DreamSleep/Profile/Account/CloseAlertView.m
查看文件 @
0fb14af
...
@@ -23,6 +23,9 @@
...
@@ -23,6 +23,9 @@
self
.
dk_backgroundColorPicker
=
DKColorPickerWithColors
(
ColorFromHex
(
0x6F7587
),
DSClearColor
,
DSWhite
);
self
.
dk_backgroundColorPicker
=
DKColorPickerWithColors
(
ColorFromHex
(
0x6F7587
),
DSClearColor
,
DSWhite
);
self
.
backgroundColor
=
[
self
.
backgroundColor
colorWithAlphaComponent
:
0
.
6
];
self
.
backgroundColor
=
[
self
.
backgroundColor
colorWithAlphaComponent
:
0
.
6
];
UITapGestureRecognizer
*
tapGR
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
tapAction
:
)];
[
self
addGestureRecognizer
:
tapGR
];
[
self
addSubview
:
self
.
alertView
];
[
self
addSubview
:
self
.
alertView
];
[
self
.
alertView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
[
self
.
alertView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
center
.
equalTo
(
self
);
make
.
center
.
equalTo
(
self
);
...
@@ -53,6 +56,12 @@
...
@@ -53,6 +56,12 @@
[
self
dismissCloseUserAlertView
];
[
self
dismissCloseUserAlertView
];
}
}
-
(
void
)
tapAction
:
(
UITapGestureRecognizer
*
)
gesture
{
if
(
!
CGRectContainsPoint
(
self
.
alertView
.
frame
,
[
gesture
locationInView
:
self
]))
{
[
self
dismissCloseUserAlertView
];
}
}
#pragma mark - lazy
#pragma mark - lazy
-
(
UIView
*
)
alertView
{
-
(
UIView
*
)
alertView
{
if
(
!
_alertView
)
{
if
(
!
_alertView
)
{
...
...
DreamSleep/DreamSleep/Profile/Account/PhotoAlertView.m
查看文件 @
0fb14af
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
@interface
PhotoAlertView
()
<
JWMImagePickerDelegate
,
RSKImageCropViewControllerDelegate
>
@interface
PhotoAlertView
()
<
JWMImagePickerDelegate
,
RSKImageCropViewControllerDelegate
>
@property
(
nonatomic
,
strong
)
UIView
*
photoView
;
@property
(
nonatomic
,
strong
)
UIView
*
photoView
;
@property
(
nonatomic
,
strong
)
JWMImagePickerController
*
imgePicker
;
@end
@end
@implementation
PhotoAlertView
{
@implementation
PhotoAlertView
{
...
@@ -25,6 +26,9 @@
...
@@ -25,6 +26,9 @@
self
.
backgroundColor
=
AlertDarkColor
;
self
.
backgroundColor
=
AlertDarkColor
;
self
.
backgroundColor
=
[
self
.
backgroundColor
colorWithAlphaComponent
:
0
.
6
];
self
.
backgroundColor
=
[
self
.
backgroundColor
colorWithAlphaComponent
:
0
.
6
];
UITapGestureRecognizer
*
tapGR
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
tapAction
:
)];
[
self
addGestureRecognizer
:
tapGR
];
[
self
addSubview
:
self
.
photoView
];
[
self
addSubview
:
self
.
photoView
];
[
self
.
photoView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
[
self
.
photoView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
centerX
.
equalTo
(
self
);
make
.
centerX
.
equalTo
(
self
);
...
@@ -78,11 +82,11 @@
...
@@ -78,11 +82,11 @@
if
([
UIImagePickerController
isSourceTypeAvailable
:
UIImagePickerControllerSourceTypeCamera
])
{
if
([
UIImagePickerController
isSourceTypeAvailable
:
UIImagePickerControllerSourceTypeCamera
])
{
AVAuthorizationStatus
authStatus
=
[
AVCaptureDevice
authorizationStatusForMediaType
:
AVMediaTypeVideo
];
AVAuthorizationStatus
authStatus
=
[
AVCaptureDevice
authorizationStatusForMediaType
:
AVMediaTypeVideo
];
if
(
authStatus
==
AVAuthorizationStatusRestricted
||
authStatus
==
AVAuthorizationStatusDenied
)
{
if
(
authStatus
==
AVAuthorizationStatusRestricted
||
authStatus
==
AVAuthorizationStatusDenied
)
{
[
[[
UIAlertView
alloc
]
initWithTitle
:
@""
message
:
@"请前往iPhone的“设置-隐私-相机”,允许APP访问您的相机。"
delegate
:
nil
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
]
show
];
[
DSProgressHUD
showDetailInfo
:
@"请前往iPhone的“设置-隐私-相机”,允许APP访问您的相机。"
];
return
;
return
;
}
}
}
else
{
}
else
{
[
[[
UIAlertView
alloc
]
initWithTitle
:
@""
message
:
@"您的设备无摄像头!"
delegate
:
nil
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
]
show
];
[
DSProgressHUD
showDetailInfo
:
@"您的设备无摄像头!"
];
return
;
return
;
}
}
[
self
presentViewController
:
ImagePickerStyleCamera
];
[
self
presentViewController
:
ImagePickerStyleCamera
];
...
@@ -92,10 +96,16 @@
...
@@ -92,10 +96,16 @@
}
}
-
(
void
)
presentViewController
:
(
ImagePickerStyle
)
style
{
-
(
void
)
presentViewController
:
(
ImagePickerStyle
)
style
{
_tmpVc
.
navigationController
.
navigationBar
.
hidden
=
YES
;
// _tmpVc.navigationController.navigationBarHidden = YES;
JWMImagePickerController
*
picker
=
[[
JWMImagePickerController
alloc
]
initWithImagePickerStyle
:
style
];
self
.
imgePicker
=
[[
JWMImagePickerController
alloc
]
initWithImagePickerStyle
:
style
];
picker
.
JWMdelegate
=
self
;
self
.
imgePicker
.
JWMdelegate
=
self
;
[
_tmpVc
presentViewController
:
picker
animated
:
YES
completion
:
nil
];
[
_tmpVc
presentViewController
:
self
.
imgePicker
animated
:
YES
completion
:
nil
];
}
-
(
void
)
tapAction
:
(
UITapGestureRecognizer
*
)
gesture
{
if
(
!
CGRectContainsPoint
(
self
.
photoView
.
frame
,
[
gesture
locationInView
:
self
]))
{
[
self
dismissPhotoAlertView
];
}
}
}
#pragma mark - JWMImagePickerDelegate
#pragma mark - JWMImagePickerDelegate
...
...
DreamSleep/DreamSleep/Profile/InviteController.m
查看文件 @
0fb14af
...
@@ -40,9 +40,13 @@
...
@@ -40,9 +40,13 @@
UIAlertAction
*
action3
=
[
UIAlertAction
actionWithTitle
:
@"QQ好友"
style
:
UIAlertActionStyleDefault
handler
:^
(
UIAlertAction
*
_Nonnull
action
)
{
UIAlertAction
*
action3
=
[
UIAlertAction
actionWithTitle
:
@"QQ好友"
style
:
UIAlertActionStyleDefault
handler
:^
(
UIAlertAction
*
_Nonnull
action
)
{
[
self
shareTextToPlatformType
:
UMSocialPlatformType_QQ
];
[
self
shareTextToPlatformType
:
UMSocialPlatformType_QQ
];
}];
}];
UIAlertAction
*
action4
=
[
UIAlertAction
actionWithTitle
:
@"取消"
style
:
UIAlertActionStyleCancel
handler
:^
(
UIAlertAction
*
_Nonnull
action
)
{
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}];
[
alertVC
addAction
:
action1
];
[
alertVC
addAction
:
action1
];
[
alertVC
addAction
:
action2
];
[
alertVC
addAction
:
action2
];
[
alertVC
addAction
:
action3
];
[
alertVC
addAction
:
action3
];
[
alertVC
addAction
:
action4
];
[
self
presentViewController
:
alertVC
animated
:
YES
completion
:
nil
];
[
self
presentViewController
:
alertVC
animated
:
YES
completion
:
nil
];
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论