Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
陈高翔
/
DreamSleep-iOS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 2e89dba8
由
cgx
编写于
2022-04-29 09:58:58 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
意见反馈输入文字限制
1 个父辈
a6300c29
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
38 行增加
和
2 行删除
DreamSleep/DreamSleep/Main/DSTabBarController.m
DreamSleep/DreamSleep/Profile/Account/CloseAlertView.m
DreamSleep/DreamSleep/Profile/Feedback/FeedbackController.m
DreamSleep/DreamSleep/Main/DSTabBarController.m
查看文件 @
2e89dba
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
self
.
tabBar
.
dk_backgroundColorPicker
=
DKColorPickerWithKey
(
TabBarBG
);
self
.
tabBar
.
dk_backgroundColorPicker
=
DKColorPickerWithKey
(
TabBarBG
);
// 设置tabbar选中及未选中的文字颜色
// 设置tabbar选中及未选中的文字颜色
self
.
tabBar
.
tintColor
=
ColorFromHex
(
0x62C3D5
)
;
self
.
tabBar
.
tintColor
=
BrandColor
;
self
.
tabBar
.
unselectedItemTintColor
=
SubTitleColor
;
self
.
tabBar
.
unselectedItemTintColor
=
SubTitleColor
;
// 设置tabbaritem图片渲染模式
// 设置tabbaritem图片渲染模式
...
...
DreamSleep/DreamSleep/Profile/Account/CloseAlertView.m
查看文件 @
2e89dba
...
@@ -127,7 +127,7 @@
...
@@ -127,7 +127,7 @@
if
(
!
_dealView
)
{
if
(
!
_dealView
)
{
_dealView
=
[
UIView
new
];
_dealView
=
[
UIView
new
];
UIButton
*
closeBtn
=
[
UIButton
btnWithTitle
:
@"注销"
titleColor
:
ColorFromHex
(
0x62C3D5
)
font
:
BoldFont
(
15
)
bgColor
:
DSClearColor
];
UIButton
*
closeBtn
=
[
UIButton
btnWithTitle
:
@"注销"
titleColor
:
BrandColor
font
:
BoldFont
(
15
)
bgColor
:
DSClearColor
];
[
closeBtn
addTarget
:
self
action
:
@selector
(
closeAction
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
closeBtn
addTarget
:
self
action
:
@selector
(
closeAction
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_dealView
addSubview
:
closeBtn
];
[
_dealView
addSubview
:
closeBtn
];
...
...
DreamSleep/DreamSleep/Profile/Feedback/FeedbackController.m
查看文件 @
2e89dba
...
@@ -20,6 +20,7 @@ static int AlbumColumnCount = 4;
...
@@ -20,6 +20,7 @@ static int AlbumColumnCount = 4;
@property
(
strong
,
nonatomic
)
UILabel
*
redLab
;
@property
(
strong
,
nonatomic
)
UILabel
*
redLab
;
@property
(
assign
,
nonatomic
)
int
unreadCount
;
@property
(
assign
,
nonatomic
)
int
unreadCount
;
@property
(
strong
,
nonatomic
)
UITextView
*
feedTV
;
@property
(
strong
,
nonatomic
)
UITextView
*
feedTV
;
@property
(
strong
,
nonatomic
)
UILabel
*
wordLimitLab
;
@property
(
strong
,
nonatomic
)
UICollectionView
*
imgCollectionView
;
@property
(
strong
,
nonatomic
)
UICollectionView
*
imgCollectionView
;
@property
(
strong
,
nonatomic
)
UIButton
*
commitBtn
;
@property
(
strong
,
nonatomic
)
UIButton
*
commitBtn
;
@end
@end
...
@@ -43,6 +44,7 @@ static int AlbumColumnCount = 4;
...
@@ -43,6 +44,7 @@ static int AlbumColumnCount = 4;
[
self
setNaviRightItem
];
[
self
setNaviRightItem
];
[
self
.
view
addSubview
:
self
.
feedTV
];
[
self
.
view
addSubview
:
self
.
feedTV
];
[
self
.
view
addSubview
:
self
.
wordLimitLab
];
[
self
.
view
addSubview
:
self
.
imgCollectionView
];
[
self
.
view
addSubview
:
self
.
imgCollectionView
];
[
self
.
view
addSubview
:
self
.
commitBtn
];
[
self
.
view
addSubview
:
self
.
commitBtn
];
...
@@ -67,6 +69,26 @@ static int AlbumColumnCount = 4;
...
@@ -67,6 +69,26 @@ static int AlbumColumnCount = 4;
#pragma mark - UITextViewDelegate
#pragma mark - UITextViewDelegate
-
(
void
)
textViewDidEndEditing
:
(
UITextView
*
)
textView
{
-
(
void
)
textViewDidEndEditing
:
(
UITextView
*
)
textView
{
textView
.
text
=
[
NSString
trimString
:
textView
.
text
];
textView
.
text
=
[
NSString
trimString
:
textView
.
text
];
[
self
dealWorldLimitAttTextWithChangeLength
:(
int
)
textView
.
text
.
length
];
}
-
(
BOOL
)
textView
:
(
UITextView
*
)
textView
shouldChangeTextInRange
:
(
NSRange
)
range
replacementText
:
(
NSString
*
)
text
{
int
textLength
=
(
int
)(
textView
.
text
.
length
-
range
.
length
+
text
.
length
);
[
self
dealWorldLimitAttTextWithChangeLength
:
textLength
];
if
(
textLength
>
400
)
{
return
NO
;
}
return
YES
;
}
-
(
void
)
dealWorldLimitAttTextWithChangeLength
:
(
int
)
changeLength
{
NSString
*
changeStr
=
[
NSString
stringWithFormat
:
@"%d"
,
changeLength
];
NSString
*
fixStr
=
@"/400"
;
NSMutableAttributedString
*
attStr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:[
NSString
stringWithFormat
:
@"%@%@"
,
changeStr
,
fixStr
]];
UIColor
*
changeColor
=
changeLength
>
400
?
ColorFromHex
(
0xF04B77
)
:
BrandColor
;
[
attStr
addAttribute
:
NSForegroundColorAttributeName
value
:
changeColor
range
:
NSMakeRange
(
0
,
changeStr
.
length
)];
UIColor
*
fixColor
=
[
self
.
dk_manager
.
themeVersion
isEqualToString
:
DKThemeVersionNormal
]
?
SmallTextColor
:
DarkTextColor
;
[
attStr
addAttribute
:
NSForegroundColorAttributeName
value
:
fixColor
range
:
NSMakeRange
(
changeStr
.
length
,
fixStr
.
length
)];
self
.
wordLimitLab
.
attributedText
=
attStr
;
}
}
#pragma mark - 品牌模式
#pragma mark - 品牌模式
...
@@ -296,6 +318,15 @@ static int AlbumColumnCount = 4;
...
@@ -296,6 +318,15 @@ static int AlbumColumnCount = 4;
return
_feedTV
;
return
_feedTV
;
}
}
-
(
UILabel
*
)
wordLimitLab
{
if
(
!
_wordLimitLab
)
{
_wordLimitLab
=
[
UILabel
labWithFont
:
SysFont
(
12
)];
_wordLimitLab
.
textAlignment
=
NSTextAlignmentRight
;
[
self
dealWorldLimitAttTextWithChangeLength
:
0
];
}
return
_wordLimitLab
;
}
-
(
UICollectionView
*
)
imgCollectionView
{
-
(
UICollectionView
*
)
imgCollectionView
{
if
(
!
_imgCollectionView
)
{
if
(
!
_imgCollectionView
)
{
UICollectionViewFlowLayout
*
layout
=
[[
UICollectionViewFlowLayout
alloc
]
init
];
UICollectionViewFlowLayout
*
layout
=
[[
UICollectionViewFlowLayout
alloc
]
init
];
...
@@ -373,6 +404,11 @@ static int AlbumColumnCount = 4;
...
@@ -373,6 +404,11 @@ static int AlbumColumnCount = 4;
make
.
bottom
.
equalTo
(
self
.
view
).
offset
(
-
91
);
make
.
bottom
.
equalTo
(
self
.
view
).
offset
(
-
91
);
make
.
size
.
mas_equalTo
(
CGSizeMake
(
155
,
40
));
make
.
size
.
mas_equalTo
(
CGSizeMake
(
155
,
40
));
}];
}];
[
self
.
wordLimitLab
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
right
.
equalTo
(
self
.
feedTV
).
offset
(
-
8
);
make
.
bottom
.
equalTo
(
self
.
feedTV
).
offset
(
-
15
);
make
.
width
.
equalTo
(
@200
);
}];
}
}
@end
@end
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论