Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
X
xffruit
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
xffruit
Commits
a00a176e
Commit
a00a176e
authored
9 years ago
by
freecui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
把首页的第二部分有collectionView换成functionbaseView
parent
12500c01
master
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
3 deletions
+74
-3
ICRHomeViewController.m
XFFruit/ViewControllers/Home/ICRHomeViewController.m
+74
-3
No files found.
XFFruit/ViewControllers/Home/ICRHomeViewController.m
View file @
a00a176e
...
...
@@ -20,7 +20,7 @@
#import "ICRFunctionBaseView.h"
#import "ICRFunctionEntity.h"
#import "ICRFunctionBaseView.h"
#import "NewSurveyViewController.h"
#import "SurveyViewController.h"
...
...
@@ -42,13 +42,17 @@
#define ICRFUNCTION_INNER_GAP (5)
#define RIGHT_LINE_WIDTH (0.5)
@interface
ICRHomeViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegate
>
//,UICollectionViewDelegateFlowLayout>
<
UITableViewDataSource
,
UITableViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegate
,
ICRFunctionBaseViewDelegate
>
//,UICollectionViewDelegateFlowLayout>
@property
(
nonatomic
,
strong
)
UITableView
*
f_tableView
;
@property
(
nonatomic
,
strong
)
NSArray
*
firstSectionArr
;
@property
(
nonatomic
,
strong
)
NSArray
*
secondSectionArr
;
@property
(
nonatomic
,
strong
)
ICRFunctionBaseView
*
f_functionBaseView
;
@property
(
nonatomic
,
strong
)
UICollectionView
*
f_collectionView
;
@end
@implementation
ICRHomeViewController
...
...
@@ -68,6 +72,7 @@ static NSString *collectionCellID = @"collectionCell";
[
self
setupRightBarBtn
];
[
self
setupTableView
];
[
self
setupColletionView
];
[
self
setupFunctionBaseView
];
}
-
(
void
)
initData
{
NSDictionary
*
dictOne
=
@{
@"Id"
:
@
(
1
),
@"functionName"
:
@"新建行情反馈"
,
@"imgName"
:
@"RefreshBtn"
,
@"isSelected"
:
@
(
0
)};
...
...
@@ -105,11 +110,75 @@ static NSString *collectionCellID = @"collectionCell";
self
.
f_collectionView
.
dataSource
=
self
;
self
.
f_collectionView
.
delegate
=
self
;
}
-
(
void
)
setupFunctionBaseView
{
NSMutableArray
*
funtionEntitlesArr
=
[
NSMutableArray
array
];
NSArray
*
functionImageNames
=
@[
@"AnnouncementIcon"
,
@"create_surver"
,
@"watch_surver"
,
@"create_surver_result"
,
@"create_needs"
,
@"watch_needs"
,
@"create_purchase"
,
@"watch_purchase"
,
@"review_purchase"
,
@"create_transport"
,
@"watch_transort"
,
@"create_process"
];
NSArray
*
functionNames
=
@[
[
IBTCommon
localizableString
:
@"Announcement"
],
[
IBTCommon
localizableString
:
@"AddSurvey"
],
[
IBTCommon
localizableString
:
@"Survey"
],
[
IBTCommon
localizableString
:
@"Survey1"
],
[
IBTCommon
localizableString
:
@"Survey2"
],
[
IBTCommon
localizableString
:
@"Survey3"
],
[
IBTCommon
localizableString
:
@"Survey4"
],
[
IBTCommon
localizableString
:
@"Survey5"
],
[
IBTCommon
localizableString
:
@"Survey6"
],
[
IBTCommon
localizableString
:
@"Survey7"
],
[
IBTCommon
localizableString
:
@"Survey8"
],[
IBTCommon
localizableString
:
@"Survey9"
],
];
NSArray
*
functionTags
=
@[
@
(
kFunctionNotice
),
//公告
@
(
kFunctionNewSurvey
),
//新建行情调研
@
(
kFunctionSeeSurvey
),
//查看行情调研
@
(
kFunctionFeeBackSurvey
),
//填写行情反馈
@
(
kFunctionNewPurchaseNotice
),
//新建采购通知
@
(
kFunctionSeePurchaseNotice
),
//查看采购通知
@
(
kFunctionNewPurchase
),
//新建采购单
@
(
kFunctionSeePurchase
),
//查看采购单
@
(
kFunctionExaminePurchas
),
//审核采购单
@
(
kFunctionNewShipment
),
//新建发运单
@
(
kFunctionSeeShipment
),
//查看发运单
@
(
kFunctionNewProcessing
)];
//新建加工单
int
i
=
0
;
for
(
NSString
*
functionName
in
functionNames
)
{
ICRFunctionEntity
*
functionEntity
=
[[
ICRFunctionEntity
alloc
]
init
];
functionEntity
.
functionName
=
functionName
;
functionEntity
.
iconName
=
functionImageNames
[
i
];
// functionEntity.functionItemTag = []
[
funtionEntitlesArr
addObject
:
functionEntity
];
i
++
;
}
self
.
f_functionBaseView
=
[
ICRFunctionBaseView
initWithFunctionData
:
funtionEntitlesArr
];
_f_functionBaseView
.
frame
=
(
CGRect
){
.
origin
.
x
=
0
,
.
origin
.
y
=
0
,
.
size
.
width
=
CGRectGetWidth
(
self
.
view
.
frame
),
.
size
.
height
=
CGRectGetHeight
(
self
.
view
.
frame
),};
_f_functionBaseView
.
backgroundColor
=
[
UIColor
clearColor
];
_f_functionBaseView
.
m_delegate
=
self
;
}
#pragma BarButton Action
-
(
void
)
defineFunctions
{
GXFFunctionsViewController
*
functionsVc
=
[[
GXFFunctionsViewController
alloc
]
init
];
[
self
PushViewController
:
functionsVc
animated
:
YES
];
}
#pragma UITablewViewDataSource
...
...
@@ -138,11 +207,13 @@ static NSString *collectionCellID = @"collectionCell";
if
(
indexPath
.
section
==
0
)
{
cell
=
[[
GXFNoticeFunctionTableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleDefault
reuseIdentifier
:
cellID
];
cell
.
accessoryType
=
UITableViewCellAccessoryDisclosureIndicator
;
cell
.
textLabel
.
text
=
@"查看行情反馈-进行中"
;
}
else
{
cell
=
[[
UITableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleDefault
reuseIdentifier
:
@"secondCell"
];
//self.f_collectionView.size =
[
cell
.
contentView
addSubview
:
_f_collectionView
];
//
[cell.contentView addSubview:_f_collectionView];
[
cell
.
contentView
addSubview
:
_f_functionBaseView
];
NSLog
(
@"%@"
,
NSStringFromCGRect
(
cell
.
frame
));
}
}
...
...
This diff is collapsed.
Click to expand it.
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