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
d7e4e33f
Commit
d7e4e33f
authored
Apr 21, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同上,完善
parent
5e620756
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/商品管理/GoodsManageListVC.swift
...inessPlatform/ViewController/商品管理/GoodsManageListVC.swift
+24
-1
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
d7e4e33f
No preview for this file type
GeliBusinessPlatform/ViewController/商品管理/GoodsManageListVC.swift
View file @
d7e4e33f
...
...
@@ -13,7 +13,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
var
collection
:
UICollectionView
?
=
nil
let
layout
=
UICollectionViewFlowLayout
()
var
layout
=
UICollectionViewFlowLayout
()
private
let
animations
=
[
AnimationType
.
from
(
direction
:
.
bottom
,
offset
:
100.0
)]
private
var
items
=
[
Any
?]()
...
...
@@ -21,6 +21,9 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
@IBOutlet
weak
var
contentView
:
UIView
!
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
layout
.
headerReferenceSize
=
CGSize
(
width
:
375
,
height
:
50
)
self
.
collection
=
UICollectionView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
0
,
height
:
0
),
collectionViewLayout
:
layout
)
self
.
collection
?
.
delegate
=
self
...
...
@@ -33,6 +36,9 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
})
self
.
collection
?
.
register
(
UINib
(
nibName
:
"GoodsCollectionViewCell"
,
bundle
:
nil
),
forCellWithReuseIdentifier
:
"GoodsCollectionViewCell"
)
self
.
collection
?
.
register
(
UICollectionReusableView
.
self
,
forSupplementaryViewOfKind
:
UICollectionView
.
elementKindSectionHeader
,
withReuseIdentifier
:
"headerIdentifier"
)
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
0.33
)
{
self
.
items
=
Array
(
repeating
:
nil
,
count
:
11
)
self
.
collection
?
.
reloadData
()
...
...
@@ -45,6 +51,23 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
}
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
viewForSupplementaryElementOfKind
kind
:
String
,
at
indexPath
:
IndexPath
)
->
UICollectionReusableView
{
let
headerV
=
collectionView
.
dequeueReusableSupplementaryView
(
ofKind
:
UICollectionView
.
elementKindSectionHeader
,
withReuseIdentifier
:
"headerIdentifier"
,
for
:
indexPath
)
let
headerLbl
=
UILabel
(
frame
:
CGRect
(
x
:
15
,
y
:
0
,
width
:
100
,
height
:
50
))
headerLbl
.
text
=
"共x件商品"
headerV
.
addSubview
(
headerLbl
)
return
headerV
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
collectionViewLayout
:
UICollectionViewLayout
,
referenceSizeForHeaderInSection
section
:
Int
)
->
CGSize
{
return
CGSize
.
init
(
width
:
375
,
height
:
50
)
}
func
numberOfSections
(
in
collectionView
:
UICollectionView
)
->
Int
{
return
1
...
...
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