Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
红
红星美凯龙管理在线APP IOS
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
张杰
红星美凯龙管理在线APP IOS
Commits
eabddaa1
Commit
eabddaa1
authored
Dec 03, 2015
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修复
parent
ce9164a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
46 deletions
+84
-46
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
HomeViewController.m
...r/Classes/Module/Home/ViewController/HomeViewController.m
+84
-46
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
eabddaa1
No preview for this file type
redstar/Classes/Module/Home/ViewController/HomeViewController.m
View file @
eabddaa1
...
...
@@ -456,10 +456,12 @@
#pragma mark - TableView Delegate/DataSource
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
if
(
_titleArray
.
count
==
6
)
{
return
3
;
}
else
{
if
(
_titleArray
.
count
==
1
)
{
return
_titleArray
.
count
;
}
else
if
(
_titleArray
.
count
==
5
){
return
2
;
}
else
{
return
3
;
}
}
...
...
@@ -467,6 +469,14 @@
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
if
(
_titleArray
.
count
==
5
)
{
if
(
section
==
0
)
{
return
_taskListDataArray
.
count
;
}
else
{
return
_allQuestionArray
.
count
;
}
}
else
{
if
(
section
==
0
)
{
return
_taskListDataArray
.
count
;
...
...
@@ -477,68 +487,96 @@
return
_allQuestionArray
.
count
;
}
}
}
// cell显示的内容
// cell显示的内容
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
indexPath
.
section
==
0
)
{
InspectListCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomeInspectListCell
];
if
(
!
cell
)
{
cell
=
[[
InspectListCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomeInspectListCell
];
if
(
_titleArray
.
count
==
5
)
{
if
(
indexPath
.
section
==
0
)
{
InspectListCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomeInspectListCell
];
if
(
!
cell
)
{
cell
=
[[
InspectListCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomeInspectListCell
];
}
TaskListModel
*
taskList
=
_taskListDataArray
[
indexPath
.
row
];
cell
.
taskList
=
taskList
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
allView
.
backgroundColor
=
kProgressViewAllBackColor
;
UIImage
*
image
=
[
UIImage
imageNamed
:
@"progress-bar"
];
image
=
[
image
resizableImageWithCapInsets
:
UIEdgeInsetsZero
resizingMode
:
UIImageResizingModeTile
];
cell
.
alreadyView
.
image
=
image
;
return
cell
;
}
else
{
// 问题与知识
QuestionListTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomeQuestionListTableCell
];
if
(
!
cell
)
{
cell
=
[[
QuestionListTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomeQuestionListTableCell
];
}
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
QuestionModel
*
question
=
_allQuestionArray
[
indexPath
.
row
];
cell
.
question
=
question
;
return
cell
;
}
TaskListModel
*
taskList
=
_taskListDataArray
[
indexPath
.
row
];
cell
.
taskList
=
taskList
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
allView
.
backgroundColor
=
kProgressViewAllBackColor
;
UIImage
*
image
=
[
UIImage
imageNamed
:
@"progress-bar"
];
image
=
[
image
resizableImageWithCapInsets
:
UIEdgeInsetsZero
resizingMode
:
UIImageResizingModeTile
];
cell
.
alreadyView
.
image
=
image
;
return
cell
;
}
else
if
(
indexPath
.
section
==
1
)
{
if
(
indexPath
.
row
==
0
)
{
HomeTitleTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomeTitleTableCell
];
}
else
{
if
(
indexPath
.
section
==
0
)
{
InspectListCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomeInspectListCell
];
if
(
!
cell
)
{
cell
=
[[
HomeTitleTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomeTitleTable
Cell
];
cell
=
[[
InspectListCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomeInspectList
Cell
];
}
TaskListModel
*
taskList
=
_taskListDataArray
[
indexPath
.
row
];
cell
.
taskList
=
taskList
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
allView
.
backgroundColor
=
kProgressViewAllBackColor
;
UIImage
*
image
=
[
UIImage
imageNamed
:
@"progress-bar"
];
image
=
[
image
resizableImageWithCapInsets
:
UIEdgeInsetsZero
resizingMode
:
UIImageResizingModeTile
];
cell
.
alreadyView
.
image
=
image
;
return
cell
;
}
else
if
(
indexPath
.
section
==
1
)
{
if
(
indexPath
.
row
==
0
)
{
HomeTitleTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomeTitleTableCell
];
if
(
!
cell
)
{
cell
=
[[
HomeTitleTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomeTitleTableCell
];
}
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
}
else
{
RankingListCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomeRankingListCell
];
if
(
!
cell
)
{
cell
=
[[
RankingListCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomeRankingListCell
];
}
cell
.
rankList
=
_allRankListArray
[
indexPath
.
row
-
1
];
cell
.
gradeImageView
.
image
=
[
UIImage
imageNamed
:[
NSString
stringWithFormat
:
@"medal_0%d"
,
(
int
)
indexPath
.
row
]];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
}
}
else
{
RankingListCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomeRankingListCell
];
// 问题与知识
QuestionListTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomeQuestionListTableCell
];
if
(
!
cell
)
{
cell
=
[[
RankingListCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomeRankingList
Cell
];
cell
=
[[
QuestionListTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomeQuestionListTable
Cell
];
}
cell
.
rankList
=
_allRankListArray
[
indexPath
.
row
-
1
];
cell
.
gradeImageView
.
image
=
[
UIImage
imageNamed
:[
NSString
stringWithFormat
:
@"medal_0%d"
,
(
int
)
indexPath
.
row
]];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
QuestionModel
*
question
=
_allQuestionArray
[
indexPath
.
row
];
cell
.
question
=
question
;
return
cell
;
}
}
else
{
// 问题与知识
QuestionListTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomeQuestionListTableCell
];
if
(
!
cell
)
{
cell
=
[[
QuestionListTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomeQuestionListTableCell
];
}
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
QuestionModel
*
question
=
_allQuestionArray
[
indexPath
.
row
];
cell
.
question
=
question
;
return
cell
;
}
}
// if ([title isEqualToString:@"口碑排名"]) {
...
...
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