Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GeliBusinessPlatform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ljy
GeliBusinessPlatform
Commits
b6eab630
Commit
b6eab630
authored
Jun 05, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息中心自适应高度
parent
e58a4566
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
13 deletions
+20
-13
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/View/Cell/MsgCenterCell.xib
GeliBusinessPlatform/View/Cell/MsgCenterCell.xib
+8
-10
GeliBusinessPlatform/ViewController/消息中心/MsgCenterViewController.swift
...latform/ViewController/消息中心/MsgCenterViewController.swift
+12
-3
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
b6eab630
No preview for this file type
GeliBusinessPlatform/View/Cell/MsgCenterCell.xib
View file @
b6eab630
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"2020.04.26 12:26:42"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"2eA-AH-8xd"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"2020.04.26 12:26:42"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"2eA-AH-8xd"
>
<rect
key=
"frame"
x=
"220"
y=
"18.5"
width=
"110"
height=
"11"
/>
<rect
key=
"frame"
x=
"220"
y=
"18.5"
width=
"110"
height=
"11"
/>
<constraints>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"110"
id=
"e4R-JE-YiJ"
/>
<constraint
firstAttribute=
"height"
constant=
"11"
id=
"nxW-7d-8Z8"
/>
<constraint
firstAttribute=
"height"
constant=
"11"
id=
"nxW-7d-8Z8"
/>
</constraints>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"11"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"11"
/>
...
@@ -34,11 +35,7 @@
...
@@ -34,11 +35,7 @@
</userDefinedRuntimeAttributes>
</userDefinedRuntimeAttributes>
</label>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"系统信息"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Uyq-HU-Mhn"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"系统信息"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Uyq-HU-Mhn"
>
<rect
key=
"frame"
x=
"15"
y=
"15"
width=
"54"
height=
"15"
/>
<rect
key=
"frame"
x=
"15"
y=
"15"
width=
"190"
height=
"16"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"54"
id=
"BSU-ua-bCn"
/>
<constraint
firstAttribute=
"height"
constant=
"15"
id=
"dcS-Od-pMI"
/>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
...
@@ -46,8 +43,8 @@
...
@@ -46,8 +43,8 @@
<userDefinedRuntimeAttribute
type=
"boolean"
keyPath=
"isSkeletonable"
value=
"YES"
/>
<userDefinedRuntimeAttribute
type=
"boolean"
keyPath=
"isSkeletonable"
value=
"YES"
/>
</userDefinedRuntimeAttributes>
</userDefinedRuntimeAttributes>
</label>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
usesAttributedText=
"YES"
lineBreakMode=
"tailTruncation"
numberOfLines=
"
2
"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"L0Y-lD-jK8"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
usesAttributedText=
"YES"
lineBreakMode=
"tailTruncation"
numberOfLines=
"
0
"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"L0Y-lD-jK8"
>
<rect
key=
"frame"
x=
"15"
y=
"
45"
width=
"315"
height=
"4
5"
/>
<rect
key=
"frame"
x=
"15"
y=
"
55.5"
width=
"315"
height=
"34.
5"
/>
<attributedString
key=
"attributedText"
>
<attributedString
key=
"attributedText"
>
<fragment
content=
"亲爱的格利食品网商户您好,您提交的(六和川香鸡柳 2.5kg*2)商品已通过审核。"
>
<fragment
content=
"亲爱的格利食品网商户您好,您提交的(六和川香鸡柳 2.5kg*2)商品已通过审核。"
>
<attributes>
<attributes>
...
@@ -65,13 +62,14 @@
...
@@ -65,13 +62,14 @@
</subviews>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<constraints>
<constraints>
<constraint
firstItem=
"
L0Y-lD-jK8"
firstAttribute=
"top"
secondItem=
"Uyq-HU-Mhn"
secondAttribute=
"bottom"
constant=
"15"
id=
"2Zg-5d-OiV
"
/>
<constraint
firstItem=
"
2eA-AH-8xd"
firstAttribute=
"leading"
secondItem=
"Uyq-HU-Mhn"
secondAttribute=
"trailing"
constant=
"15"
id=
"64g-49-VTK
"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"L0Y-lD-jK8"
secondAttribute=
"trailing"
constant=
"15"
id=
"Es3-UB-hpq"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"L0Y-lD-jK8"
secondAttribute=
"trailing"
constant=
"15"
id=
"Es3-UB-hpq"
/>
<constraint
firstItem=
"Uyq-HU-Mhn"
firstAttribute=
"
leading"
secondItem=
"uwl-m3-ngX"
secondAttribute=
"leading"
constant=
"15"
id=
"Hwa-1L-6Th
"
/>
<constraint
firstItem=
"Uyq-HU-Mhn"
firstAttribute=
"
top"
secondItem=
"uwl-m3-ngX"
secondAttribute=
"top"
constant=
"15"
id=
"Scu-8r-GhY
"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"L0Y-lD-jK8"
secondAttribute=
"bottom"
constant=
"15"
id=
"TVQ-NZ-3Kp"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"L0Y-lD-jK8"
secondAttribute=
"bottom"
constant=
"15"
id=
"TVQ-NZ-3Kp"
/>
<constraint
firstItem=
"L0Y-lD-jK8"
firstAttribute=
"top"
secondItem=
"Uyq-HU-Mhn"
secondAttribute=
"bottom"
constant=
"24.5"
id=
"Yb3-lL-TpS"
/>
<constraint
firstItem=
"Uyq-HU-Mhn"
firstAttribute=
"leading"
secondItem=
"uwl-m3-ngX"
secondAttribute=
"leading"
constant=
"15"
id=
"bIr-PI-RQM"
/>
<constraint
firstItem=
"2eA-AH-8xd"
firstAttribute=
"top"
secondItem=
"uwl-m3-ngX"
secondAttribute=
"top"
constant=
"18.5"
id=
"bXx-va-TXG"
/>
<constraint
firstItem=
"2eA-AH-8xd"
firstAttribute=
"top"
secondItem=
"uwl-m3-ngX"
secondAttribute=
"top"
constant=
"18.5"
id=
"bXx-va-TXG"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"2eA-AH-8xd"
secondAttribute=
"trailing"
constant=
"15"
id=
"elW-DD-S3i"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"2eA-AH-8xd"
secondAttribute=
"trailing"
constant=
"15"
id=
"elW-DD-S3i"
/>
<constraint
firstItem=
"Uyq-HU-Mhn"
firstAttribute=
"top"
secondItem=
"uwl-m3-ngX"
secondAttribute=
"top"
constant=
"15"
id=
"erb-jN-Eas"
/>
<constraint
firstItem=
"L0Y-lD-jK8"
firstAttribute=
"leading"
secondItem=
"uwl-m3-ngX"
secondAttribute=
"leading"
constant=
"15"
id=
"x8l-w3-84L"
/>
<constraint
firstItem=
"L0Y-lD-jK8"
firstAttribute=
"leading"
secondItem=
"uwl-m3-ngX"
secondAttribute=
"leading"
constant=
"15"
id=
"x8l-w3-84L"
/>
</constraints>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttributes>
...
...
GeliBusinessPlatform/ViewController/消息中心/MsgCenterViewController.swift
View file @
b6eab630
...
@@ -34,6 +34,9 @@ class MsgCenterViewController: BaseViewController,UITableViewDelegate,UITableVie
...
@@ -34,6 +34,9 @@ class MsgCenterViewController: BaseViewController,UITableViewDelegate,UITableVie
make
.
left
.
right
.
bottom
.
equalTo
(
0
)
make
.
left
.
right
.
bottom
.
equalTo
(
0
)
})
})
msgTbv
?
.
estimatedRowHeight
=
30
msgTbv
!.
rowHeight
=
UITableView
.
automaticDimension
msgTbv
?
.
register
(
UINib
(
nibName
:
"MsgCenterCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"MsgCenterCell"
)
msgTbv
?
.
register
(
UINib
(
nibName
:
"MsgCenterCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"MsgCenterCell"
)
//下拉刷新相关设置
//下拉刷新相关设置
headerMJ
.
setRefreshingTarget
(
self
,
refreshingAction
:
#selector(
loadData
)
)
headerMJ
.
setRefreshingTarget
(
self
,
refreshingAction
:
#selector(
loadData
)
)
...
@@ -42,9 +45,11 @@ class MsgCenterViewController: BaseViewController,UITableViewDelegate,UITableVie
...
@@ -42,9 +45,11 @@ class MsgCenterViewController: BaseViewController,UITableViewDelegate,UITableVie
footerMJ
.
setRefreshingTarget
(
self
,
refreshingAction
:
#selector(
loadMoreData
)
)
footerMJ
.
setRefreshingTarget
(
self
,
refreshingAction
:
#selector(
loadMoreData
)
)
self
.
msgTbv
!.
mj_footer
=
footerMJ
self
.
msgTbv
!.
mj_footer
=
footerMJ
self
.
msgTbv
?
.
mj_header
?
.
beginRefreshing
()
self
.
msgTbv
?
.
mj_header
?
.
beginRefreshing
()
}
}
var
dataModelArr
:
Array
<
MessageListDataModel
>
=
[]
var
dataModelArr
:
Array
<
MessageListDataModel
>
=
[]
var
page
=
1
var
page
=
1
//加载数据
//加载数据
@objc
func
loadData
(){
@objc
func
loadData
(){
page
=
1
page
=
1
...
@@ -93,14 +98,18 @@ class MsgCenterViewController: BaseViewController,UITableViewDelegate,UITableVie
...
@@ -93,14 +98,18 @@ class MsgCenterViewController: BaseViewController,UITableViewDelegate,UITableVie
}
}
})
{
(
error
)
in
})
{
(
error
)
in
self
.
msgTbv
?
.
mj_footer
?
.
endRefreshing
()
self
.
msgTbv
?
.
mj_footer
?
.
endRefreshing
()
}
}
}
}
//MARK: -Cell delegate方法
//MARK: -Cell delegate方法
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
120
// func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
// return 120
// }
func
tableView
(
_
tableView
:
UITableView
,
estimatedHeightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
print
(
tableView
.
estimatedRowHeight
)
return
250
}
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
self
.
dataModelArr
.
count
return
self
.
dataModelArr
.
count
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment