Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
陈高翔
/
DreamSleep-iOS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 4ca62a62
由
cgx
编写于
2022-04-22 10:08:06 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
拍照页面问题梳理
1 个父辈
0fb14af2
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
43 行增加
和
29 行删除
DreamSleep/DreamSleep/Category/DSNavigationTools/NaviBarHandlerProtocol.h
DreamSleep/DreamSleep/Category/DSNavigationTools/UIViewController+Swizzling.m
DreamSleep/DreamSleep/Profile/Account/AccountController.m
DreamSleep/DreamSleep/Profile/Account/JWMImagePickerController.h
DreamSleep/DreamSleep/Profile/Account/JWMImagePickerController.m
DreamSleep/DreamSleep/Profile/Account/PhotoAlertView.m
DreamSleep/DreamSleep/Profile/Account/UserInfoView.h
DreamSleep/DreamSleep/Profile/Account/UserInfoView.m
DreamSleep/DreamSleep/Utils/DSConstUtil.m
DreamSleep/DreamSleep/Category/DSNavigationTools/NaviBarHandlerProtocol.h
查看文件 @
4ca62a6
...
@@ -9,15 +9,17 @@
...
@@ -9,15 +9,17 @@
/**
/**
导航控制器风格
导航控制器风格
- NaviStyleDefault: 默认
- NaviStyleDefault : 默认
- NaviStyleLight : Light
- NaviStyleLight : Light
- NaviStyleDark : Dark
- NaviStyleDark : Dark
- NaviStylePicker : 系统拍照
- NaviStyleUndef:未定义
- NaviStyleUndef:未定义
*/
*/
typedef
NS_ENUM
(
NSUInteger
,
NaviStyle
)
{
typedef
NS_ENUM
(
NSUInteger
,
NaviStyle
)
{
NaviStyleDefault
,
NaviStyleDefault
,
NaviStyleLight
,
NaviStyleLight
,
NaviStyleDark
,
NaviStyleDark
,
NaviStylePicker
,
NaviStyleUndef
NaviStyleUndef
};
};
...
...
DreamSleep/DreamSleep/Category/DSNavigationTools/UIViewController+Swizzling.m
查看文件 @
4ca62a6
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#import "UIViewController+Swizzling.h"
#import "UIViewController+Swizzling.h"
#import "BaseNaviController.h"
#import "BaseNaviController.h"
#import <objc/runtime.h>
#import <objc/runtime.h>
#import "JWMImagePickerController.h"
@implementation
UIViewController
(
Swizzling
)
@implementation
UIViewController
(
Swizzling
)
...
@@ -52,12 +53,20 @@
...
@@ -52,12 +53,20 @@
self
.
navigationController
.
navigationBarHidden
=
([
self
respondsToSelector
:
@selector
(
isShowNavigationBar
)]
&&
[
self
isShowNavigationBar
]
==
YES
)
?
YES
:
NO
;
self
.
navigationController
.
navigationBarHidden
=
([
self
respondsToSelector
:
@selector
(
isShowNavigationBar
)]
&&
[
self
isShowNavigationBar
]
==
YES
)
?
YES
:
NO
;
#pragma mark - 根据不同页面设置不同的导航栏风格
#pragma mark - 根据不同页面设置不同的导航栏风格
if
([
self
respondsToSelector
:
@selector
(
navigationBarStyle
)])
{
NSString
*
className
=
NSStringFromClass
([
self
class
]);
[
BaseNaviController
setNavigationBarStyle
:[
self
navigationBarStyle
]
vc
:
self
];
NSArray
*
classArrary
=
@[
@"JWMImagePickerController"
,
}
else
{
@"CAMImagePickerCameraViewController"
,
@"CAMViewfinderViewController"
,
@"CAMPreviewViewController"
,
// 默认风格
@"UIInputWindowController"
,
@"UIEditingOverlayViewController"
,
@"PUPhotoPickerHostViewController"
,
if
(
self
.
navigationController
)
{
@"PLPhotoTileViewController"
];
[
BaseNaviController
setNavigationBarStyle
:
NaviStyleDefault
vc
:
self
];
// 排除系统相机和相册
if
(
!
[
classArrary
containsObject
:
className
])
{
if
([
self
respondsToSelector
:
@selector
(
navigationBarStyle
)])
{
[
BaseNaviController
setNavigationBarStyle
:[
self
navigationBarStyle
]
vc
:
self
];
}
else
{
// 默认风格
if
(
self
.
navigationController
)
{
[
BaseNaviController
setNavigationBarStyle
:
NaviStyleDefault
vc
:
self
];
}
}
}
}
}
...
@@ -109,7 +118,7 @@
...
@@ -109,7 +118,7 @@
}
}
#pragma mark - 页面浏览统计
#pragma mark - 页面浏览统计
#pragma mark - 重返系统事件
#pragma mark - 重返系统事件
[
self
swiz_viewDidAppear
:
animated
];
[
self
swiz_viewDidAppear
:
animated
];
}
}
...
...
DreamSleep/DreamSleep/Profile/Account/AccountController.m
查看文件 @
4ca62a6
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
-
(
UserInfoView
*
)
userInfoView
{
-
(
UserInfoView
*
)
userInfoView
{
if
(
!
_userInfoView
)
{
if
(
!
_userInfoView
)
{
_userInfoView
=
[[
UserInfoView
alloc
]
initWithDelegate
:
self
];
_userInfoView
=
[[
UserInfoView
alloc
]
initWithDelegate
:
self
vc
:
self
];
}
}
return
_userInfoView
;
return
_userInfoView
;
}
}
...
...
DreamSleep/DreamSleep/Profile/Account/JWMImagePickerController.h
查看文件 @
4ca62a6
...
@@ -23,6 +23,6 @@ typedef NS_ENUM(NSUInteger,ImagePickerStyle) {
...
@@ -23,6 +23,6 @@ typedef NS_ENUM(NSUInteger,ImagePickerStyle) {
@property
(
nonatomic
,
weak
)
id
<
JWMImagePickerDelegate
>
JWMdelegate
;
@property
(
nonatomic
,
weak
)
id
<
JWMImagePickerDelegate
>
JWMdelegate
;
/* 初始化方法 */
/* 初始化方法 */
-
(
instancetype
)
initWithImagePickerStyle
:(
ImagePickerStyle
)
style
;
-
(
instancetype
)
initWithImagePickerStyle
:(
ImagePickerStyle
)
style
delegate
:(
id
<
JWMImagePickerDelegate
>
)
delegate
;
@end
@end
DreamSleep/DreamSleep/Profile/Account/JWMImagePickerController.m
查看文件 @
4ca62a6
...
@@ -13,9 +13,13 @@
...
@@ -13,9 +13,13 @@
@implementation
JWMImagePickerController
@implementation
JWMImagePickerController
-
(
instancetype
)
initWithImagePickerStyle
:(
ImagePickerStyle
)
style
{
-
(
instancetype
)
initWithImagePickerStyle
:(
ImagePickerStyle
)
style
delegate
:(
id
<
JWMImagePickerDelegate
>
)
delegate
{
self
=
[
super
init
];
if
(
self
=
[
super
init
])
{
if
(
self
)
{
_JWMdelegate
=
delegate
;
self
.
allowsEditing
=
NO
;
self
.
delegate
=
self
;
if
(
style
==
ImagePickerStyleCamera
)
{
if
(
style
==
ImagePickerStyleCamera
)
{
self
.
sourceType
=
UIImagePickerControllerSourceTypeCamera
;
self
.
sourceType
=
UIImagePickerControllerSourceTypeCamera
;
}
else
if
(
style
==
ImagePickerStylePhotoLibrary
)
{
}
else
if
(
style
==
ImagePickerStylePhotoLibrary
)
{
...
@@ -25,13 +29,6 @@
...
@@ -25,13 +29,6 @@
return
self
;
return
self
;
}
}
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
allowsEditing
=
NO
;
self
.
delegate
=
self
;
self
.
view
.
backgroundColor
=
[
UIColor
colorWithWhite
:
0
.
875
alpha
:
1
.
000
];
}
-
(
void
)
imagePickerController
:(
UIImagePickerController
*
)
picker
didFinishPickingMediaWithInfo
:(
NSDictionary
<
NSString
*
,
id
>
*
)
info
{
-
(
void
)
imagePickerController
:(
UIImagePickerController
*
)
picker
didFinishPickingMediaWithInfo
:(
NSDictionary
<
NSString
*
,
id
>
*
)
info
{
UIImage
*
editedImage
=
[
info
objectForKey
:
UIImagePickerControllerOriginalImage
];
UIImage
*
editedImage
=
[
info
objectForKey
:
UIImagePickerControllerOriginalImage
];
[
picker
dismissViewControllerAnimated
:
YES
completion
:
nil
];
[
picker
dismissViewControllerAnimated
:
YES
completion
:
nil
];
...
...
DreamSleep/DreamSleep/Profile/Account/PhotoAlertView.m
查看文件 @
4ca62a6
...
@@ -96,9 +96,8 @@
...
@@ -96,9 +96,8 @@
}
}
-
(
void
)
presentViewController
:
(
ImagePickerStyle
)
style
{
-
(
void
)
presentViewController
:
(
ImagePickerStyle
)
style
{
// _tmpVc.navigationController.navigationBarHidden = YES;
self
.
imgePicker
=
[[
JWMImagePickerController
alloc
]
initWithImagePickerStyle
:
style
delegate
:
self
];
self
.
imgePicker
=
[[
JWMImagePickerController
alloc
]
initWithImagePickerStyle
:
style
];
self
.
imgePicker
.
navigationBar
.
barTintColor
=
style
==
ImagePickerStyleCamera
?
DSBlack
:
DSWhite
;
self
.
imgePicker
.
JWMdelegate
=
self
;
[
_tmpVc
presentViewController
:
self
.
imgePicker
animated
:
YES
completion
:
nil
];
[
_tmpVc
presentViewController
:
self
.
imgePicker
animated
:
YES
completion
:
nil
];
}
}
...
...
DreamSleep/DreamSleep/Profile/Account/UserInfoView.h
查看文件 @
4ca62a6
...
@@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
@property
(
nonatomic
,
weak
)
id
<
UserInfoViewDelegate
>
delegate
;
@property
(
nonatomic
,
weak
)
id
<
UserInfoViewDelegate
>
delegate
;
-
(
instancetype
)
initWithDelegate
:(
id
<
UserInfoViewDelegate
>
)
delegate
;
-
(
instancetype
)
initWithDelegate
:(
id
<
UserInfoViewDelegate
>
)
delegate
vc
:(
UIViewController
*
)
vc
;
@end
@end
...
...
DreamSleep/DreamSleep/Profile/Account/UserInfoView.m
查看文件 @
4ca62a6
...
@@ -16,10 +16,13 @@
...
@@ -16,10 +16,13 @@
@property
(
nonatomic
,
strong
)
UIButton
*
layoutBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
layoutBtn
;
@end
@end
@implementation
UserInfoView
@implementation
UserInfoView
{
UIViewController
*
_tmpVC
;
}
-
(
instancetype
)
initWithDelegate
:(
id
<
UserInfoViewDelegate
>
)
delegate
{
-
(
instancetype
)
initWithDelegate
:
(
id
<
UserInfoViewDelegate
>
)
delegate
vc
:
(
UIViewController
*
)
vc
{
if
(
self
=
[
super
initWithFrame
:
CGRectMake
(
0
,
0
,
kScreenWidth
,
kScreenHeight
-
kTopHeight
(
0
))])
{
if
(
self
=
[
super
initWithFrame
:
CGRectMake
(
0
,
0
,
kScreenWidth
,
kScreenHeight
-
kTopHeight
(
0
))])
{
_tmpVC
=
vc
;
_delegate
=
delegate
;
_delegate
=
delegate
;
[
self
.
portraitBtn
yy_setImageWithURL
:[
NSURL
URLWithString
:
@"https://img2.ydniu.com/sleep_ssmain/face_img/1648892614555_QhXhJX.jpg"
]
forState
:
UIControlStateNormal
placeholder
:
[
UIImage
imageNamed
:
@"portrait"
]];
[
self
.
portraitBtn
yy_setImageWithURL
:[
NSURL
URLWithString
:
@"https://img2.ydniu.com/sleep_ssmain/face_img/1648892614555_QhXhJX.jpg"
]
forState
:
UIControlStateNormal
placeholder
:
[
UIImage
imageNamed
:
@"portrait"
]];
...
@@ -38,7 +41,7 @@
...
@@ -38,7 +41,7 @@
}
}
-
(
void
)
updatePortraitAction
{
-
(
void
)
updatePortraitAction
{
[[[
PhotoAlertView
alloc
]
initWithVC
:
self
.
ds_viewController
]
showPhotoAlertView
];
[[[
PhotoAlertView
alloc
]
initWithVC
:
_tmpVC
]
showPhotoAlertView
];
}
}
-
(
void
)
layoutAction
{
-
(
void
)
layoutAction
{
...
...
DreamSleep/DreamSleep/Utils/DSConstUtil.m
查看文件 @
4ca62a6
...
@@ -29,7 +29,11 @@ NSString * const UserBasicInfo = @"UserBasicInfo";
...
@@ -29,7 +29,11 @@ NSString * const UserBasicInfo = @"UserBasicInfo";
NSString
*
const
WeChatAppID
=
@"wx4cdd4760092cdfdf"
;
NSString
*
const
WeChatAppID
=
@"wx4cdd4760092cdfdf"
;
NSString
*
const
WeChatAppSecret
=
@"72c0a939b605b824d0c6d9dbde152ae0"
;
NSString
*
const
WeChatAppSecret
=
@"72c0a939b605b824d0c6d9dbde152ae0"
;
// xinstall平台的
NSString
*
const
UNIVERSAL_LINK
=
@"https://ocusmp.xinstall.com.cn/tolink/"
;
NSString
*
const
UNIVERSAL_LINK
=
@"https://ocusmp.xinstall.com.cn/tolink/"
;
// 友盟平台的
// NSString * const UNIVERSAL_LINK = @"https://8e0bcfb.umindex.com/";
NSString
*
const
QQAppID
=
@"1111310949"
;
NSString
*
const
QQAppID
=
@"1111310949"
;
NSString
*
const
QQAppKey
=
@"CiiSZ3E04SlKKmVN"
;
NSString
*
const
QQAppKey
=
@"CiiSZ3E04SlKKmVN"
;
NSString
*
const
UMengAppKey
=
@"62048053e0f9bb492bfcb0e8"
;
NSString
*
const
UMengAppKey
=
@"62048053e0f9bb492bfcb0e8"
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论