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
d267a5c8
Commit
d267a5c8
authored
May 07, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成工作中心-功能列表UI
parent
323938fa
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
398 additions
and
3 deletions
+398
-3
GeliBusinessPlatform.xcodeproj/project.pbxproj
GeliBusinessPlatform.xcodeproj/project.pbxproj
+16
-0
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
...ujunhong.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+23
-0
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
...essPlatform/ViewController/工作中心/WorkCViewController.swift
+4
-0
GeliBusinessPlatform/ViewController/工作中心/WorkItemCollectionViewCell.swift
...form/ViewController/工作中心/WorkItemCollectionViewCell.swift
+1
-0
GeliBusinessPlatform/ViewController/工作中心/WorkItemCollectionViewCell.xib
...atform/ViewController/工作中心/WorkItemCollectionViewCell.xib
+1
-0
GeliBusinessPlatform/ViewController/工作中心/WorkItemTableViewCell.xib
...essPlatform/ViewController/工作中心/WorkItemTableViewCell.xib
+1
-0
GeliBusinessPlatform/ViewController/工作中心/编辑工作中心/EditWorkCViewController.swift
.../ViewController/工作中心/编辑工作中心/EditWorkCViewController.swift
+242
-0
GeliBusinessPlatform/ViewController/工作中心/编辑工作中心/EditWorkCViewController.xib
...rm/ViewController/工作中心/编辑工作中心/EditWorkCViewController.xib
+107
-0
GeliBusinessPlatform/ViewController/账号信息/AccountViewController.xib
...essPlatform/ViewController/账号信息/AccountViewController.xib
+3
-3
No files found.
GeliBusinessPlatform.xcodeproj/project.pbxproj
View file @
d267a5c8
...
@@ -251,6 +251,8 @@
...
@@ -251,6 +251,8 @@
F94A315C24628C7E00FEC38E
/* WorkItemTableViewCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F94A315A24628C7E00FEC38E
/* WorkItemTableViewCell.xib */
;
};
F94A315C24628C7E00FEC38E
/* WorkItemTableViewCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F94A315A24628C7E00FEC38E
/* WorkItemTableViewCell.xib */
;
};
F94A315F24629DDD00FEC38E
/* WorkBannerTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F94A315D24629DDD00FEC38E
/* WorkBannerTableViewCell.swift */
;
};
F94A315F24629DDD00FEC38E
/* WorkBannerTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F94A315D24629DDD00FEC38E
/* WorkBannerTableViewCell.swift */
;
};
F94A316024629DDD00FEC38E
/* WorkBannerTableViewCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F94A315E24629DDD00FEC38E
/* WorkBannerTableViewCell.xib */
;
};
F94A316024629DDD00FEC38E
/* WorkBannerTableViewCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F94A315E24629DDD00FEC38E
/* WorkBannerTableViewCell.xib */
;
};
F94A31642462B21700FEC38E
/* EditWorkCViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F94A31622462B21700FEC38E
/* EditWorkCViewController.swift */
;
};
F94A31652462B21700FEC38E
/* EditWorkCViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F94A31632462B21700FEC38E
/* EditWorkCViewController.xib */
;
};
F950FDA32451438A00C40530
/* AdminInfoModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F950FDA22451438A00C40530
/* AdminInfoModel.swift */
;
};
F950FDA32451438A00C40530
/* AdminInfoModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F950FDA22451438A00C40530
/* AdminInfoModel.swift */
;
};
F950FDA52451453A00C40530
/* ShopInfoModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F950FDA42451453A00C40530
/* ShopInfoModel.swift */
;
};
F950FDA52451453A00C40530
/* ShopInfoModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F950FDA42451453A00C40530
/* ShopInfoModel.swift */
;
};
F950FDA72451494500C40530
/* GeliPayInfoModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F950FDA62451494500C40530
/* GeliPayInfoModel.swift */
;
};
F950FDA72451494500C40530
/* GeliPayInfoModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
F950FDA62451494500C40530
/* GeliPayInfoModel.swift */
;
};
...
@@ -591,6 +593,8 @@
...
@@ -591,6 +593,8 @@
F94A315A24628C7E00FEC38E
/* WorkItemTableViewCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
WorkItemTableViewCell.xib
;
sourceTree
=
"<group>"
;
};
F94A315A24628C7E00FEC38E
/* WorkItemTableViewCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
WorkItemTableViewCell.xib
;
sourceTree
=
"<group>"
;
};
F94A315D24629DDD00FEC38E
/* WorkBannerTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
WorkBannerTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
F94A315D24629DDD00FEC38E
/* WorkBannerTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
WorkBannerTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
F94A315E24629DDD00FEC38E
/* WorkBannerTableViewCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
WorkBannerTableViewCell.xib
;
sourceTree
=
"<group>"
;
};
F94A315E24629DDD00FEC38E
/* WorkBannerTableViewCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
WorkBannerTableViewCell.xib
;
sourceTree
=
"<group>"
;
};
F94A31622462B21700FEC38E
/* EditWorkCViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
EditWorkCViewController.swift
;
sourceTree
=
"<group>"
;
};
F94A31632462B21700FEC38E
/* EditWorkCViewController.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
EditWorkCViewController.xib
;
sourceTree
=
"<group>"
;
};
F950FDA22451438A00C40530
/* AdminInfoModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AdminInfoModel.swift
;
sourceTree
=
"<group>"
;
};
F950FDA22451438A00C40530
/* AdminInfoModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AdminInfoModel.swift
;
sourceTree
=
"<group>"
;
};
F950FDA42451453A00C40530
/* ShopInfoModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ShopInfoModel.swift
;
sourceTree
=
"<group>"
;
};
F950FDA42451453A00C40530
/* ShopInfoModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ShopInfoModel.swift
;
sourceTree
=
"<group>"
;
};
F950FDA62451494500C40530
/* GeliPayInfoModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GeliPayInfoModel.swift
;
sourceTree
=
"<group>"
;
};
F950FDA62451494500C40530
/* GeliPayInfoModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GeliPayInfoModel.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -1451,6 +1455,7 @@
...
@@ -1451,6 +1455,7 @@
F94A315024626D4000FEC38E
/* 工作中心 */
=
{
F94A315024626D4000FEC38E
/* 工作中心 */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
F94A31612462B1DF00FEC38E
/* 编辑工作中心 */
,
F94A315124626D7800FEC38E
/* WorkCViewController.swift */
,
F94A315124626D7800FEC38E
/* WorkCViewController.swift */
,
F94A315224626D7800FEC38E
/* WorkCViewController.xib */
,
F94A315224626D7800FEC38E
/* WorkCViewController.xib */
,
F94A315524628AC600FEC38E
/* WorkItemCollectionViewCell.swift */
,
F94A315524628AC600FEC38E
/* WorkItemCollectionViewCell.swift */
,
...
@@ -1463,6 +1468,15 @@
...
@@ -1463,6 +1468,15 @@
path
=
"工作中心"
;
path
=
"工作中心"
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
};
};
F94A31612462B1DF00FEC38E
/* 编辑工作中心 */
=
{
isa
=
PBXGroup
;
children
=
(
F94A31622462B21700FEC38E
/* EditWorkCViewController.swift */
,
F94A31632462B21700FEC38E
/* EditWorkCViewController.xib */
,
);
path
=
"编辑工作中心"
;
sourceTree
=
"<group>"
;
};
F950FDAF245171E000C40530
/* TimeSelectView */
=
{
F950FDAF245171E000C40530
/* TimeSelectView */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
...
@@ -1761,6 +1775,7 @@
...
@@ -1761,6 +1775,7 @@
E0516F832448086700E373CE
/* MsgCenterCell.xib in Resources */
,
E0516F832448086700E373CE
/* MsgCenterCell.xib in Resources */
,
E0B9461F24566B3100FBEC9A
/* TitleAndTFAndBtnCell.xib in Resources */
,
E0B9461F24566B3100FBEC9A
/* TitleAndTFAndBtnCell.xib in Resources */
,
E0DDCB10244AD8C500DF54C7
/* DaiQueRenCell.xib in Resources */
,
E0DDCB10244AD8C500DF54C7
/* DaiQueRenCell.xib in Resources */
,
F94A31652462B21700FEC38E
/* EditWorkCViewController.xib in Resources */
,
E0BE8A9D245A9E5900E80134
/* YingFuZhangKuanXQCell.xib in Resources */
,
E0BE8A9D245A9E5900E80134
/* YingFuZhangKuanXQCell.xib in Resources */
,
E0A2E82824555B4400D6DB34
/* KuCunShangPinCell.xib in Resources */
,
E0A2E82824555B4400D6DB34
/* KuCunShangPinCell.xib in Resources */
,
E042F73D245288F800CDFA12
/* WenDuCell.xib in Resources */
,
E042F73D245288F800CDFA12
/* WenDuCell.xib in Resources */
,
...
@@ -2114,6 +2129,7 @@
...
@@ -2114,6 +2129,7 @@
F94A314D2462582F00FEC38E
/* GeneralInfoModel.swift in Sources */
,
F94A314D2462582F00FEC38E
/* GeneralInfoModel.swift in Sources */
,
E02DDD8D244FE43900ABB707
/* NewCreateFooter.swift in Sources */
,
E02DDD8D244FE43900ABB707
/* NewCreateFooter.swift in Sources */
,
E0D197CF24485649002B080C
/* BluetoothConnectViewController.swift in Sources */
,
E0D197CF24485649002B080C
/* BluetoothConnectViewController.swift in Sources */
,
F94A31642462B21700FEC38E
/* EditWorkCViewController.swift in Sources */
,
F94A315F24629DDD00FEC38E
/* WorkBannerTableViewCell.swift in Sources */
,
F94A315F24629DDD00FEC38E
/* WorkBannerTableViewCell.swift in Sources */
,
E042F73C245288F800CDFA12
/* WenDuCell.swift in Sources */
,
E042F73C245288F800CDFA12
/* WenDuCell.swift in Sources */
,
F933F6C92452C68B00189561
/* HUD.swift in Sources */
,
F933F6C92452C68B00189561
/* HUD.swift in Sources */
,
...
...
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
d267a5c8
No preview for this file type
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
View file @
d267a5c8
...
@@ -3,4 +3,27 @@
...
@@ -3,4 +3,27 @@
uuid =
"5B8F44F7-39A9-41EF-84D0-455B68FF56A8"
uuid =
"5B8F44F7-39A9-41EF-84D0-455B68FF56A8"
type =
"0"
type =
"0"
version =
"2.0"
>
version =
"2.0"
>
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.ExceptionBreakpoint"
>
<BreakpointContent
uuid =
"28CE393B-0C38-4855-BA55-51896D8FB746"
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
breakpointStackSelectionBehavior =
"1"
scope =
"1"
stopOnStyle =
"0"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.SwiftErrorBreakpoint"
>
<BreakpointContent
uuid =
"6550B373-E925-4A81-B16D-B8228EBE65C0"
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
</Bucket>
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
View file @
d267a5c8
...
@@ -68,6 +68,10 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
...
@@ -68,6 +68,10 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
}
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
print
(
"点中cell--
\(
indexPath
.
row
)
"
)
print
(
"点中cell--
\(
indexPath
.
row
)
"
)
if
indexPath
.
row
==
1
{
let
vc
=
EditWorkCViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
}
}
...
...
GeliBusinessPlatform/ViewController/工作中心/WorkItemCollectionViewCell.swift
View file @
d267a5c8
...
@@ -18,4 +18,5 @@ class WorkItemCollectionViewCell: UICollectionViewCell {
...
@@ -18,4 +18,5 @@ class WorkItemCollectionViewCell: UICollectionViewCell {
// Initialization code
// Initialization code
}
}
}
}
GeliBusinessPlatform/ViewController/工作中心/WorkItemCollectionViewCell.xib
View file @
d267a5c8
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
</imageView>
</imageView>
</subviews>
</subviews>
</view>
</view>
<gestureRecognizers/>
<constraints>
<constraints>
<constraint
firstAttribute=
"trailing"
secondItem=
"pg3-lh-kp9"
secondAttribute=
"trailing"
id=
"74N-EK-MFS"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"pg3-lh-kp9"
secondAttribute=
"trailing"
id=
"74N-EK-MFS"
/>
<constraint
firstItem=
"nZJ-9s-cJg"
firstAttribute=
"leading"
secondItem=
"gTV-IL-0wX"
secondAttribute=
"leading"
constant=
"3"
id=
"8vJ-pB-TcE"
/>
<constraint
firstItem=
"nZJ-9s-cJg"
firstAttribute=
"leading"
secondItem=
"gTV-IL-0wX"
secondAttribute=
"leading"
constant=
"3"
id=
"8vJ-pB-TcE"
/>
...
...
GeliBusinessPlatform/ViewController/工作中心/WorkItemTableViewCell.xib
View file @
d267a5c8
...
@@ -72,6 +72,7 @@
...
@@ -72,6 +72,7 @@
<constraint
firstAttribute=
"trailing"
secondItem=
"j1a-a2-V8p"
secondAttribute=
"trailing"
id=
"rat-IE-T6s"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"j1a-a2-V8p"
secondAttribute=
"trailing"
id=
"rat-IE-T6s"
/>
</constraints>
</constraints>
</tableViewCellContentView>
</tableViewCellContentView>
<gestureRecognizers/>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<connections>
<connections>
<outlet
property=
"collectionView"
destination=
"j1a-a2-V8p"
id=
"Tgt-LU-8iy"
/>
<outlet
property=
"collectionView"
destination=
"j1a-a2-V8p"
id=
"Tgt-LU-8iy"
/>
...
...
GeliBusinessPlatform/ViewController/工作中心/编辑工作中心/EditWorkCViewController.swift
0 → 100644
View file @
d267a5c8
//
// EditWorkCViewController.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/5/6.
// Copyright © 2020 junye lu. All rights reserved.
//
import
UIKit
class
EditWorkCViewController
:
BaseViewController
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
{
var
items
=
[
"科技"
,
"军事"
,
"国际"
,
"数码"
,
"星座"
,
"电影"
,
"时尚"
]
@IBOutlet
weak
var
topLayou
:
NSLayoutConstraint
!
@IBOutlet
weak
var
itemListCollectionView
:
UICollectionView
!
@IBOutlet
weak
var
titleView
:
UIView
!
@IBOutlet
weak
var
collectionVheight
:
NSLayoutConstraint
!
@IBOutlet
weak
var
collectionView
:
UICollectionView
!
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
navbar
.
title
=
"功能列表"
navbar
.
rightTitle
=
"保存"
self
.
view
.
addSubview
(
navbar
)
topLayou
.
constant
=
CGFloat
(
NavHeight
)
//设置collectionView的代理
self
.
collectionView
.
delegate
=
self
self
.
collectionView
.
dataSource
=
self
// 注册CollectionViewCell
self
.
collectionView
!.
register
(
UINib
(
nibName
:
"WorkItemCollectionViewCell"
,
bundle
:
nil
),
forCellWithReuseIdentifier
:
"WorkItemCollectionViewCell"
)
//更新collectionView的高度约束
let
contentSize
=
self
.
collectionView
.
collectionViewLayout
.
collectionViewContentSize
collectionVheight
.
constant
=
contentSize
.
height
self
.
collectionView
.
collectionViewLayout
.
invalidateLayout
()
let
longPress
=
UILongPressGestureRecognizer
(
target
:
self
,
action
:
#selector(
longPressGesture(_:)
)
)
collectionView
.
addGestureRecognizer
(
longPress
)
//全部item展示
//设置collectionView的代理
self
.
itemListCollectionView
.
delegate
=
self
self
.
itemListCollectionView
.
dataSource
=
self
// 注册CollectionViewCell
self
.
itemListCollectionView
!.
register
(
UINib
(
nibName
:
"WorkItemCollectionViewCell"
,
bundle
:
nil
),
forCellWithReuseIdentifier
:
"WorkItemCollectionViewCell"
)
self
.
itemListCollectionView
?
.
register
(
UICollectionReusableView
.
self
,
forSupplementaryViewOfKind
:
UICollectionView
.
elementKindSectionHeader
,
withReuseIdentifier
:
"headerIdentifier"
)
}
func
numberOfSections
(
in
collectionView
:
UICollectionView
)
->
Int
{
if
collectionView
==
self
.
itemListCollectionView
{
return
5
}
return
1
}
//返回collectionView的单元格数量
func
collectionView
(
_
collectionView
:
UICollectionView
,
numberOfItemsInSection
section
:
Int
)
->
Int
{
if
collectionView
==
self
.
itemListCollectionView
{
return
6
}
return
items
.
count
+
1
}
//返回对应的单元格
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
"WorkItemCollectionViewCell"
,
for
:
indexPath
)
as!
WorkItemCollectionViewCell
if
collectionView
==
self
.
itemListCollectionView
{
if
indexPath
.
row
%
2
==
0
{
cell
.
itemImgV
.
image
=
UIImage
.
init
(
named
:
"worktest1"
)
}
else
{
cell
.
itemImgV
.
image
=
UIImage
.
init
(
named
:
"worktest2"
)
}
cell
.
bgImV
.
image
=
UIImage
.
init
(
named
:
"workjian"
)
}
else
{
if
indexPath
.
row
==
items
.
count
{
cell
.
itemNameLbl
.
isHidden
=
true
cell
.
itemImgV
.
isHidden
=
true
cell
.
bgImV
.
image
=
UIImage
.
init
(
named
:
"workkuang"
)
}
else
{
cell
.
itemNameLbl
.
isHidden
=
false
cell
.
itemImgV
.
isHidden
=
false
cell
.
itemNameLbl
.
text
=
items
[
indexPath
.
row
]
if
indexPath
.
row
%
2
==
0
{
cell
.
itemImgV
.
image
=
UIImage
.
init
(
named
:
"worktest1"
)
}
else
{
cell
.
itemImgV
.
image
=
UIImage
.
init
(
named
:
"worktest2"
)
}
cell
.
bgImV
.
image
=
UIImage
.
init
(
named
:
"workjian"
)
}
}
return
cell
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
viewForSupplementaryElementOfKind
kind
:
String
,
at
indexPath
:
IndexPath
)
->
UICollectionReusableView
{
if
collectionView
==
self
.
itemListCollectionView
{
let
titleS
=
[
"订单管理"
,
"商品管理"
,
"仓库管理"
,
"采购管理"
,
"财务关联"
]
let
headerV
=
collectionView
.
dequeueReusableSupplementaryView
(
ofKind
:
UICollectionView
.
elementKindSectionHeader
,
withReuseIdentifier
:
"headerIdentifier"
,
for
:
indexPath
)
headerV
.
subviews
.
forEach
{
(
view
)
in
view
.
removeFromSuperview
()
}
let
headerLbl
=
UILabel
(
frame
:
CGRect
(
x
:
15*
glscale
,
y
:
10*
glscale
,
width
:
100*
glscale
,
height
:
20*
glscale
))
headerLbl
.
text
=
titleS
[
indexPath
.
section
]
headerLbl
.
textColor
=
UIColor
.
init
(
named
:
"标题字颜色"
)
headerLbl
.
font
=
UIFont
.
systemFont
(
ofSize
:
13
)
headerV
.
addSubview
(
headerLbl
)
return
headerV
}
let
view
=
UIView
()
return
view
as!
UICollectionReusableView
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
collectionViewLayout
:
UICollectionViewLayout
,
referenceSizeForHeaderInSection
section
:
Int
)
->
CGSize
{
if
collectionView
==
self
.
itemListCollectionView
{
return
CGSize
.
init
(
width
:
self
.
view
.
bounds
.
width
,
height
:
30*
glscale
)
}
return
CGSize
.
zero
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
print
(
"选中item=
\(
indexPath
.
section
)
=
\(
indexPath
.
row
)
"
)
if
collectionView
==
self
.
itemListCollectionView
{
}
else
{
items
.
remove
(
at
:
indexPath
.
row
)
self
.
collectionView
.
reloadData
()
//更新collectionView的高度约束
let
contentSize
=
self
.
collectionView
.
collectionViewLayout
.
collectionViewContentSize
collectionVheight
.
constant
=
contentSize
.
height
self
.
collectionView
.
collectionViewLayout
.
invalidateLayout
()
}
}
//MARK:--保存方法
func
rightBtnClick
()
{
print
(
"要记得保存哦"
)
}
//MARK:--长按所需的参数
var
indexPath
:
IndexPath
?
var
targetIndexPath
:
IndexPath
?
private
lazy
var
dragingItem
:
WorkItemCollectionViewCell
=
{
let
nib
=
UINib
(
nibName
:
"WorkItemCollectionViewCell"
,
bundle
:
nil
)
let
cell
=
nib
.
instantiate
(
withOwner
:
self
,
options
:
nil
)
.
first
as!
WorkItemCollectionViewCell
cell
.
isHidden
=
true
return
cell
}()
//MARK:--长按方法
@objc
func
longPressGesture
(
_
sender
:
UILongPressGestureRecognizer
){
print
(
"长按···"
)
let
point
=
sender
.
location
(
in
:
collectionView
)
switch
sender
.
state
{
case
.
began
:
dragBegan
(
point
:
point
)
break
case
.
changed
:
drageChanged
(
point
:
point
)
break
case
.
ended
:
drageEnded
(
point
:
point
)
break
case
.
cancelled
:
drageEnded
(
point
:
point
)
break
default
:
break
}
}
//MARK: - 长按开始
private
func
dragBegan
(
point
:
CGPoint
)
{
dragingItem
.
removeFromSuperview
()
collectionView
.
addSubview
(
dragingItem
)
indexPath
=
collectionView
.
indexPathForItem
(
at
:
point
)
if
indexPath
==
nil
||
(
indexPath
?
.
section
)
!
>
0
||
indexPath
?
.
row
==
items
.
count
{
return
}
let
item
=
collectionView
.
cellForItem
(
at
:
indexPath
!
)
as!
WorkItemCollectionViewCell
item
.
isHidden
=
true
dragingItem
.
isHidden
=
false
dragingItem
.
frame
=
(
item
.
frame
)
//配置一样的item
dragingItem
.
itemNameLbl
.
text
=
item
.
itemNameLbl
.
text
dragingItem
.
itemImgV
.
image
=
item
.
itemImgV
.
image
dragingItem
.
bgImV
.
image
=
item
.
bgImV
.
image
dragingItem
.
transform
=
CGAffineTransform
(
scaleX
:
1.1
,
y
:
1.1
)
}
//MARK: - 长按过程
private
func
drageChanged
(
point
:
CGPoint
)
{
if
indexPath
==
nil
||
(
indexPath
?
.
section
)
!
>
0
{
return
}
dragingItem
.
center
=
point
targetIndexPath
=
collectionView
.
indexPathForItem
(
at
:
point
)
if
targetIndexPath
==
nil
||
(
targetIndexPath
?
.
section
)
!
>
0
||
indexPath
==
targetIndexPath
||
targetIndexPath
?
.
row
==
items
.
count
{
return
}
// 更新数据
let
obj
=
items
[
indexPath
!.
item
]
items
.
remove
(
at
:
indexPath
!.
row
)
items
.
insert
(
obj
,
at
:
targetIndexPath
!.
item
)
//交换位置
collectionView
.
moveItem
(
at
:
indexPath
!
,
to
:
targetIndexPath
!
)
indexPath
=
targetIndexPath
}
//MARK: - 长按结束
private
func
drageEnded
(
point
:
CGPoint
)
{
if
indexPath
==
nil
||
(
indexPath
?
.
section
)
!
>
0
||
indexPath
?
.
row
==
items
.
count
{
return
}
let
endCell
=
collectionView
.
cellForItem
(
at
:
indexPath
!
)
UIView
.
animate
(
withDuration
:
0.25
,
animations
:
{
self
.
dragingItem
.
transform
=
CGAffineTransform
.
identity
self
.
dragingItem
.
center
=
(
endCell
?
.
center
)
!
},
completion
:
{
(
finish
)
->
()
in
endCell
?
.
isHidden
=
false
self
.
dragingItem
.
isHidden
=
true
self
.
indexPath
=
nil
})
}
}
GeliBusinessPlatform/ViewController/工作中心/编辑工作中心/EditWorkCViewController.xib
0 → 100644
View file @
d267a5c8
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"16096"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina4_7"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"16086"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"EditWorkCViewController"
customModule=
"GeliBusinessPlatform"
customModuleProvider=
"target"
>
<connections>
<outlet
property=
"collectionVheight"
destination=
"ej4-tR-5IQ"
id=
"lVq-h3-JWK"
/>
<outlet
property=
"collectionView"
destination=
"bJE-2x-TVD"
id=
"kjQ-vk-ukD"
/>
<outlet
property=
"itemListCollectionView"
destination=
"I9C-SQ-Pii"
id=
"5Sy-zY-7pP"
/>
<outlet
property=
"titleView"
destination=
"z1l-B1-PLS"
id=
"awV-lq-A5D"
/>
<outlet
property=
"topLayou"
destination=
"unq-b1-X4T"
id=
"wzQ-1b-UDe"
/>
<outlet
property=
"view"
destination=
"i5M-Pr-FkT"
id=
"sfx-zR-JGt"
/>
</connections>
</placeholder>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<view
clearsContextBeforeDrawing=
"NO"
contentMode=
"scaleToFill"
id=
"i5M-Pr-FkT"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"667"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<collectionView
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"scaleToFill"
dataMode=
"none"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"bJE-2x-TVD"
>
<rect
key=
"frame"
x=
"0.0"
y=
"36"
width=
"375"
height=
"100"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"100"
id=
"ej4-tR-5IQ"
/>
</constraints>
<collectionViewFlowLayout
key=
"collectionViewLayout"
minimumLineSpacing=
"10"
minimumInteritemSpacing=
"10"
id=
"DRE-wW-q2S"
>
<size
key=
"itemSize"
width=
"61"
height=
"69"
/>
<size
key=
"headerReferenceSize"
width=
"0.0"
height=
"0.0"
/>
<size
key=
"footerReferenceSize"
width=
"0.0"
height=
"0.0"
/>
<inset
key=
"sectionInset"
minX=
"15"
minY=
"15"
maxX=
"15"
maxY=
"15"
/>
</collectionViewFlowLayout>
</collectionView>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"z1l-B1-PLS"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"36"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
usesAttributedText=
"YES"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"tVb-9c-Owx"
>
<rect
key=
"frame"
x=
"15"
y=
"15"
width=
"60"
height=
"21"
/>
<attributedString
key=
"attributedText"
>
<fragment
content=
"常用功能"
>
<attributes>
<color
key=
"NSColor"
name=
"标题字颜色"
/>
<font
key=
"NSFont"
size=
"15"
name=
"PingFangSC-Medium"
/>
<paragraphStyle
key=
"NSParagraphStyle"
alignment=
"left"
lineBreakMode=
"wordWrapping"
baseWritingDirection=
"natural"
tighteningFactorForTruncation=
"0.0"
/>
</attributes>
</fragment>
</attributedString>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"长按可移动图标位置,最多10个图标。"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"46H-tS-Yqb"
>
<rect
key=
"frame"
x=
"80"
y=
"22"
width=
"193"
height=
"14"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"11"
/>
<color
key=
"textColor"
name=
"灰色字体颜色"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<constraints>
<constraint
firstItem=
"46H-tS-Yqb"
firstAttribute=
"leading"
secondItem=
"tVb-9c-Owx"
secondAttribute=
"trailing"
constant=
"5"
id=
"FsH-w8-1ed"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"tVb-9c-Owx"
secondAttribute=
"bottom"
id=
"Hap-qb-wac"
/>
<constraint
firstItem=
"46H-tS-Yqb"
firstAttribute=
"bottom"
secondItem=
"tVb-9c-Owx"
secondAttribute=
"bottom"
id=
"Tz7-FB-xwt"
/>
<constraint
firstItem=
"tVb-9c-Owx"
firstAttribute=
"top"
secondItem=
"z1l-B1-PLS"
secondAttribute=
"top"
constant=
"15"
id=
"kt6-N1-oTp"
/>
<constraint
firstItem=
"tVb-9c-Owx"
firstAttribute=
"leading"
secondItem=
"z1l-B1-PLS"
secondAttribute=
"leading"
constant=
"15"
id=
"q5h-5A-xq7"
/>
</constraints>
</view>
<collectionView
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"scaleToFill"
dataMode=
"none"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"I9C-SQ-Pii"
>
<rect
key=
"frame"
x=
"0.0"
y=
"151"
width=
"375"
height=
"516"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<collectionViewFlowLayout
key=
"collectionViewLayout"
minimumLineSpacing=
"10"
minimumInteritemSpacing=
"10"
id=
"p8Q-tB-399"
>
<size
key=
"itemSize"
width=
"61"
height=
"69"
/>
<size
key=
"headerReferenceSize"
width=
"0.0"
height=
"0.0"
/>
<size
key=
"footerReferenceSize"
width=
"0.0"
height=
"0.0"
/>
<inset
key=
"sectionInset"
minX=
"15"
minY=
"10"
maxX=
"15"
maxY=
"15"
/>
</collectionViewFlowLayout>
</collectionView>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<constraints>
<constraint
firstItem=
"z1l-B1-PLS"
firstAttribute=
"trailing"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"trailing"
id=
"0Mm-H4-e1l"
/>
<constraint
firstItem=
"z1l-B1-PLS"
firstAttribute=
"leading"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"leading"
id=
"3IF-EF-10f"
/>
<constraint
firstItem=
"bJE-2x-TVD"
firstAttribute=
"top"
secondItem=
"z1l-B1-PLS"
secondAttribute=
"bottom"
id=
"98q-wB-Khr"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"I9C-SQ-Pii"
secondAttribute=
"bottom"
id=
"R46-7U-3sT"
/>
<constraint
firstItem=
"fnl-2z-Ty3"
firstAttribute=
"trailing"
secondItem=
"I9C-SQ-Pii"
secondAttribute=
"trailing"
id=
"U35-i9-n0S"
/>
<constraint
firstItem=
"I9C-SQ-Pii"
firstAttribute=
"top"
secondItem=
"bJE-2x-TVD"
secondAttribute=
"bottom"
constant=
"15"
id=
"ha4-Tg-Cdr"
/>
<constraint
firstItem=
"I9C-SQ-Pii"
firstAttribute=
"leading"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"leading"
id=
"kUi-bm-h8S"
/>
<constraint
firstItem=
"bJE-2x-TVD"
firstAttribute=
"leading"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"leading"
id=
"sCj-vg-Ea2"
/>
<constraint
firstItem=
"z1l-B1-PLS"
firstAttribute=
"top"
secondItem=
"i5M-Pr-FkT"
secondAttribute=
"top"
id=
"unq-b1-X4T"
/>
<constraint
firstItem=
"bJE-2x-TVD"
firstAttribute=
"trailing"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"trailing"
id=
"yeJ-jj-xTJ"
/>
</constraints>
<viewLayoutGuide
key=
"safeArea"
id=
"fnl-2z-Ty3"
/>
<point
key=
"canvasLocation"
x=
"108"
y=
"56.221889055472268"
/>
</view>
</objects>
<resources>
<namedColor
name=
"标题字颜色"
>
<color
red=
"0.18000000715255737"
green=
"0.18000000715255737"
blue=
"0.18000000715255737"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"灰色字体颜色"
>
<color
red=
"0.40000000596046448"
green=
"0.40000000596046448"
blue=
"0.40000000596046448"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</resources>
</document>
GeliBusinessPlatform/ViewController/账号信息/AccountViewController.xib
View file @
d267a5c8
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
5702
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
6096
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
5704
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
6086
"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
...
@@ -290,7 +290,7 @@
...
@@ -290,7 +290,7 @@
<color
red=
"0.3880000114440918"
green=
"0.62400001287460327"
blue=
"0.90200001001358032"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.3880000114440918"
green=
"0.62400001287460327"
blue=
"0.90200001001358032"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
<namedColor
name=
"按钮渐变色下,字体颜色"
>
<namedColor
name=
"按钮渐变色下,字体颜色"
>
<color
red=
"0.27
450980392156865"
green=
"0.5607843137254902"
blue=
"0.88627450980392153
"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.27
843137254901962"
green=
"0.5607843137254902"
blue=
"0.8901960784313725
"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</namedColor>
<namedColor
name=
"标题字颜色"
>
<namedColor
name=
"标题字颜色"
>
<color
red=
"0.18000000715255737"
green=
"0.18000000715255737"
blue=
"0.18000000715255737"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.18000000715255737"
green=
"0.18000000715255737"
blue=
"0.18000000715255737"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
...
...
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