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
fc6efa4b
Commit
fc6efa4b
authored
9 years ago
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
参考标准完成
parent
f29fa7ad
master
develop
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
507 additions
and
67 deletions
+507
-67
project.pbxproj
redstar.xcodeproj/project.pbxproj
+24
-12
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
InspectInterfaceCell.h
...OfMouth/Inspect/InspectDetail/Cell/InspectInterfaceCell.h
+13
-0
InspectInterfaceCell.m
...OfMouth/Inspect/InspectDetail/Cell/InspectInterfaceCell.m
+23
-0
InspectNotUpLoadCell.h
...OfMouth/Inspect/InspectDetail/Cell/InspectNotUpLoadCell.h
+3
-4
InspectNotUpLoadCell.m
...OfMouth/Inspect/InspectDetail/Cell/InspectNotUpLoadCell.m
+14
-6
InspectUpLoadFootView.h
...fMouth/Inspect/InspectDetail/View/InspectUpLoadFootView.h
+26
-0
InspectUpLoadFootView.m
...fMouth/Inspect/InspectDetail/View/InspectUpLoadFootView.m
+198
-0
InspectNotUploadViewController.h
...ectDetail/ViewController/InspectNotUploadViewController.h
+15
-0
InspectNotUploadViewController.m
...ectDetail/ViewController/InspectNotUploadViewController.m
+33
-39
InspectUploadedViewController.h
...pectDetail/ViewController/InspectUploadedViewController.h
+3
-3
InspectUploadedViewController.m
...pectDetail/ViewController/InspectUploadedViewController.m
+147
-0
InspectTaskViewController.m
...ct/InspectTask/ViewController/InspectTaskViewController.m
+8
-3
No files found.
redstar.xcodeproj/project.pbxproj
View file @
fc6efa4b
...
...
@@ -63,10 +63,12 @@
84C9574D1BDB344900083584
/* UIBarButtonItem+Create.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84C9574A1BDB344900083584
/* UIBarButtonItem+Create.m */
;
};
84C9574E1BDB344900083584
/* UIView+Frame.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84C9574C1BDB344900083584
/* UIView+Frame.m */
;
};
84C957551BDB54D600083584
/* AnnounceViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84C957541BDB54D600083584
/* AnnounceViewController.m */
;
};
84CF0ED51BE9AC1400C855CE
/* InspectSettleCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84CF0ED41BE9AC1400C855CE
/* InspectSettleCell.m */
;
};
84CF0ED81BE9AC7E00C855CE
/* InspectSettleViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84CF0ED71BE9AC7E00C855CE
/* InspectSettleViewController.m */
;
};
84CF0F1E1BE9B40400C855CE
/* InspectDetailFooterView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84CF0F1D1BE9B40400C855CE
/* InspectDetailFooterView.m */
;
};
84CF0FA21BE9EDA900C855CE
/* TakePhotoView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84CF0FA11BE9EDA900C855CE
/* TakePhotoView.m */
;
};
84D3E5F01C04BC8C001FF1DD
/* InspectUploadedViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D3E5EF1C04BC8C001FF1DD
/* InspectUploadedViewController.m */
;
};
84D3E5F31C04BCD3001FF1DD
/* InspectNotUploadViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D3E5F21C04BCD3001FF1DD
/* InspectNotUploadViewController.m */
;
};
84D3E5F91C04BD8E001FF1DD
/* InspectNotUpLoadCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D3E5F81C04BD8E001FF1DD
/* InspectNotUpLoadCell.m */
;
};
84D3E6021C04DA85001FF1DD
/* InspectUpLoadFootView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D3E6011C04DA85001FF1DD
/* InspectUpLoadFootView.m */
;
};
84D80EB51BF714BE00A10EA4
/* GroupItems.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D80EB21BF714BE00A10EA4
/* GroupItems.m */
;
};
84D80EB61BF714BE00A10EA4
/* GroupTabBar.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D80EB41BF714BE00A10EA4
/* GroupTabBar.m */
;
};
84D8257F1BDD2F7E00CC61F7
/* MineTableFooterView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D8257E1BDD2F7E00CC61F7
/* MineTableFooterView.m */
;
};
...
...
@@ -227,14 +229,18 @@
84C9574F1BDB38AA00083584
/* redstar.pch */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
redstar.pch
;
sourceTree
=
"<group>"
;
};
84C957531BDB54D600083584
/* AnnounceViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
AnnounceViewController.h
;
sourceTree
=
"<group>"
;
};
84C957541BDB54D600083584
/* AnnounceViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
AnnounceViewController.m
;
sourceTree
=
"<group>"
;
};
84CF0ED31BE9AC1400C855CE
/* InspectSettleCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
InspectSettleCell.h
;
sourceTree
=
"<group>"
;
};
84CF0ED41BE9AC1400C855CE
/* InspectSettleCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
InspectSettleCell.m
;
sourceTree
=
"<group>"
;
};
84CF0ED61BE9AC7E00C855CE
/* InspectSettleViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
InspectSettleViewController.h
;
sourceTree
=
"<group>"
;
};
84CF0ED71BE9AC7E00C855CE
/* InspectSettleViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
InspectSettleViewController.m
;
sourceTree
=
"<group>"
;
};
84CF0F1C1BE9B40400C855CE
/* InspectDetailFooterView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
InspectDetailFooterView.h
;
sourceTree
=
"<group>"
;
};
84CF0F1D1BE9B40400C855CE
/* InspectDetailFooterView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
InspectDetailFooterView.m
;
sourceTree
=
"<group>"
;
};
84CF0FA01BE9EDA900C855CE
/* TakePhotoView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
TakePhotoView.h
;
sourceTree
=
"<group>"
;
};
84CF0FA11BE9EDA900C855CE
/* TakePhotoView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
TakePhotoView.m
;
sourceTree
=
"<group>"
;
};
84D3E5EE1C04BC8C001FF1DD
/* InspectUploadedViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
InspectUploadedViewController.h
;
sourceTree
=
"<group>"
;
};
84D3E5EF1C04BC8C001FF1DD
/* InspectUploadedViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
InspectUploadedViewController.m
;
sourceTree
=
"<group>"
;
};
84D3E5F11C04BCD3001FF1DD
/* InspectNotUploadViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
InspectNotUploadViewController.h
;
sourceTree
=
"<group>"
;
};
84D3E5F21C04BCD3001FF1DD
/* InspectNotUploadViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
InspectNotUploadViewController.m
;
sourceTree
=
"<group>"
;
};
84D3E5F71C04BD8E001FF1DD
/* InspectNotUpLoadCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
InspectNotUpLoadCell.h
;
sourceTree
=
"<group>"
;
};
84D3E5F81C04BD8E001FF1DD
/* InspectNotUpLoadCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
InspectNotUpLoadCell.m
;
sourceTree
=
"<group>"
;
};
84D3E6001C04DA85001FF1DD
/* InspectUpLoadFootView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
InspectUpLoadFootView.h
;
sourceTree
=
"<group>"
;
};
84D3E6011C04DA85001FF1DD
/* InspectUpLoadFootView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
InspectUpLoadFootView.m
;
sourceTree
=
"<group>"
;
};
84D80EB11BF714BE00A10EA4
/* GroupItems.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
GroupItems.h
;
sourceTree
=
"<group>"
;
};
84D80EB21BF714BE00A10EA4
/* GroupItems.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
GroupItems.m
;
sourceTree
=
"<group>"
;
};
84D80EB31BF714BE00A10EA4
/* GroupTabBar.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
GroupTabBar.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -1121,8 +1127,8 @@
84CF0ECB1BE9A7EF00C855CE
/* Cell */
=
{
isa
=
PBXGroup
;
children
=
(
84
CF0ED31BE9AC1400C855CE
/* InspectSettle
Cell.h */
,
84
CF0ED41BE9AC1400C855CE
/* InspectSettle
Cell.m */
,
84
D3E5F71C04BD8E001FF1DD
/* InspectNotUpLoad
Cell.h */
,
84
D3E5F81C04BD8E001FF1DD
/* InspectNotUpLoad
Cell.m */
,
);
path
=
Cell
;
sourceTree
=
"<group>"
;
...
...
@@ -1130,8 +1136,10 @@
84CF0ECC1BE9A7EF00C855CE
/* ViewController */
=
{
isa
=
PBXGroup
;
children
=
(
84CF0ED61BE9AC7E00C855CE
/* InspectSettleViewController.h */
,
84CF0ED71BE9AC7E00C855CE
/* InspectSettleViewController.m */
,
84D3E5EE1C04BC8C001FF1DD
/* InspectUploadedViewController.h */
,
84D3E5EF1C04BC8C001FF1DD
/* InspectUploadedViewController.m */
,
84D3E5F11C04BCD3001FF1DD
/* InspectNotUploadViewController.h */
,
84D3E5F21C04BCD3001FF1DD
/* InspectNotUploadViewController.m */
,
);
path
=
ViewController
;
sourceTree
=
"<group>"
;
...
...
@@ -1143,6 +1151,8 @@
84CF0F1D1BE9B40400C855CE
/* InspectDetailFooterView.m */
,
84CF0FA01BE9EDA900C855CE
/* TakePhotoView.h */
,
84CF0FA11BE9EDA900C855CE
/* TakePhotoView.m */
,
84D3E6001C04DA85001FF1DD
/* InspectUpLoadFootView.h */
,
84D3E6011C04DA85001FF1DD
/* InspectUpLoadFootView.m */
,
);
path
=
View
;
sourceTree
=
"<group>"
;
...
...
@@ -1570,6 +1580,7 @@
848699B31BDF810900859DFE
/* InspectTaskViewController.m in Sources */
,
84AD4F321BF443E700BFB37C
/* InspectDetailHeaderView.m in Sources */
,
84E420471BE88AE000689976
/* RootTabBarController.m in Sources */
,
84D3E5F01C04BC8C001FF1DD
/* InspectUploadedViewController.m in Sources */
,
840826211BE5D2400022B795
/* OnLineFooterView.m in Sources */
,
8487D80C1BF218F900E63E90
/* MenuView.m in Sources */
,
8474C5921BE78A85007DCF19
/* QuestionViewController.m in Sources */
,
...
...
@@ -1580,7 +1591,6 @@
8408261A1BE5CEDD0022B795
/* OnLineViewController.m in Sources */
,
84F57C9C1BECA73800DDEEB1
/* StarBar.m in Sources */
,
84F57C4C1BEC785E00DDEEB1
/* AddQuestionViewController.m in Sources */
,
84CF0ED51BE9AC1400C855CE
/* InspectSettleCell.m in Sources */
,
84C957551BDB54D600083584
/* AnnounceViewController.m in Sources */
,
84D80EB51BF714BE00A10EA4
/* GroupItems.m in Sources */
,
84C9574D1BDB344900083584
/* UIBarButtonItem+Create.m in Sources */
,
...
...
@@ -1590,7 +1600,8 @@
8490C4D31BF9DEF0006B6569
/* PictureTableCell.m in Sources */
,
84970E391BD8E0B300C1728A
/* LoginView.m in Sources */
,
84DB9BC41BDCD4B600822CC4
/* CustomDropMenuView.m in Sources */
,
84CF0ED81BE9AC7E00C855CE
/* InspectSettleViewController.m in Sources */
,
84D3E5F31C04BCD3001FF1DD
/* InspectNotUploadViewController.m in Sources */
,
84D3E5F91C04BD8E001FF1DD
/* InspectNotUpLoadCell.m in Sources */
,
84ECCF1F1C021E7F00EA4960
/* RedStarTools.m in Sources */
,
84ECCF181C01FA2600EA4960
/* QuestionDetailModel.m in Sources */
,
84846E9A1BE07CDF0010550A
/* RankingListCell.m in Sources */
,
...
...
@@ -1602,6 +1613,7 @@
84DB9BC71BDCD67200822CC4
/* UIView+Extension.m in Sources */
,
8462C6EC1BF5F3BE00344DDD
/* MenuButton.m in Sources */
,
8442BA5C1BDB8FDB005E5657
/* MineTableHeaderView.m in Sources */
,
84D3E6021C04DA85001FF1DD
/* InspectUpLoadFootView.m in Sources */
,
8474C5991BE78BBC007DCF19
/* QuestionDetailCell.m in Sources */
,
8474C5911BE78A85007DCF19
/* QuestionListTableCell.m in Sources */
,
8490C4D71BF9DF1D006B6569
/* PictureStoryViewController.m in Sources */
,
...
...
This diff is collapsed.
Click to expand it.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
fc6efa4b
No preview for this file type
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/Cell/InspectInterfaceCell.h
0 → 100644
View file @
fc6efa4b
//
// InspectInterfaceCell.h
// redstar
//
// Created by admin on 15/11/25.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
InspectInterfaceCell
:
UITableViewCell
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/Cell/InspectInterfaceCell.m
0 → 100644
View file @
fc6efa4b
//
// InspectInterfaceCell.m
// redstar
//
// Created by admin on 15/11/25.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "InspectInterfaceCell.h"
@implementation
InspectInterfaceCell
-
(
void
)
awakeFromNib
{
// Initialization code
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
[
super
setSelected
:
selected
animated
:
animated
];
// Configure the view for the selected state
}
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/Cell/Inspect
Settle
Cell.h
→
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/Cell/Inspect
NotUpLoad
Cell.h
View file @
fc6efa4b
//
// Inspect
Settle
Cell.h
// Inspect
NotUpLoad
Cell.h
// redstar
//
// Created by admin on 15/11/4.
// Created by admin on 15/11/
2
4.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
Inspect
Settle
Cell
:
UITableViewCell
@interface
Inspect
NotUpLoad
Cell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
titleDetailLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
introLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
introDetailLabel
;
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/Cell/Inspect
Settle
Cell.m
→
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/Cell/Inspect
NotUpLoad
Cell.m
View file @
fc6efa4b
//
// Inspect
Settle
Cell.m
// Inspect
NotUpLoad
Cell.m
// redstar
//
// Created by admin on 15/11/4.
// Created by admin on 15/11/
2
4.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "Inspect
Settle
Cell.h"
#import "Inspect
NotUpLoad
Cell.h"
@implementation
Inspect
Settle
Cell
@implementation
Inspect
NotUpLoad
Cell
#pragma mark - System Methods
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
{
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
];
...
...
@@ -125,4 +125,12 @@
return
_introDetailLabel
;
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
[
super
setSelected
:
selected
animated
:
animated
];
// Configure the view for the selected state
}
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/View/InspectUpLoadFootView.h
0 → 100644
View file @
fc6efa4b
//
// InspectUpLoadFootView.h
// redstar
//
// Created by admin on 15/11/25.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol
InspectUpLoadFootDelegate
<
NSObject
>
-
(
void
)
returnParentsViewController
;
@end
@interface
InspectUpLoadFootView
:
UIView
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
-
(
instancetype
)
initWithAnswerAttachments
:(
NSArray
*
)
answerAttachments
referenceAttachments
:(
NSArray
*
)
referenceAttachments
remark
:(
NSString
*
)
remark
;
@property
(
nonatomic
,
assign
)
id
<
InspectUpLoadFootDelegate
>
delegate
;
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/View/InspectUpLoadFootView.m
0 → 100644
View file @
fc6efa4b
//
// InspectUpLoadFootView.m
// redstar
//
// Created by admin on 15/11/25.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "InspectUpLoadFootView.h"
#import <UIImageView+WebCache.h>
//#define kImageItemWidth
//#define kImageItemHeigh
@implementation
InspectUpLoadFootView
-
(
instancetype
)
initWithAnswerAttachments
:(
NSArray
*
)
answerAttachments
referenceAttachments
:(
NSArray
*
)
referenceAttachments
remark
:(
NSString
*
)
remark
{
self
=
[
super
init
];
if
(
self
)
{
self
.
backgroundColor
=
kSectionBackGroundColor
;
NSLog
(
@"answerAttachments.count = %ld referenceAttachments.count = %ld"
,
answerAttachments
.
count
,
referenceAttachments
.
count
);
CGFloat
imageMaginX
=
20
;
CGFloat
imageMaginY
=
10
;
CGFloat
imageW
=
(
kScreenWidth
-
imageMaginX
*
3
)
/
2
;
CGFloat
imageH
=
100
;
int
answerCount
=
(
int
)
answerAttachments
.
count
;
int
answerRow
=
0
;
if
(
answerCount
%
2
==
0
)
{
answerRow
=
answerCount
/
2
;
}
else
{
answerRow
=
(
answerCount
+
1
)
/
2
;
}
int
referenceCount
=
(
int
)
referenceAttachments
.
count
;
int
referenceRow
=
0
;
if
(
referenceCount
%
2
==
0
)
{
referenceRow
=
referenceCount
/
2
;
}
else
{
referenceRow
=
(
referenceCount
+
1
)
/
2
;
}
self
.
height
=
imageMaginY
+
(
25
*
2
)
+
answerRow
*
(
imageH
+
imageMaginY
)
+
imageMaginY
+
referenceRow
*
(
imageH
+
imageMaginY
)
+
imageMaginY
+
100
+
60
;
self
.
titleLabel
.
text
=
@"现场照片"
;
// 现场照片
for
(
int
i
=
0
;
i
<
answerAttachments
.
count
;
i
++
)
{
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
init
];
NSDictionary
*
dict
=
(
NSDictionary
*
)
answerAttachments
[
i
];
NSURL
*
imageUrl
=
[
NSURL
URLWithString
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
dict
[
@"fileUrl"
]]];
[
imageView
sd_setImageWithURL
:
imageUrl
placeholderImage
:[
UIImage
imageNamed
:
@"default_pic"
]];
int
j
=
0
;
if
((
i
+
1
)
%
2
==
0
)
{
j
=
(
i
+
1
)
/
2
;
imageView
.
frame
=
CGRectMake
(
imageMaginX
+
(
imageW
+
imageMaginX
),
35
+
imageMaginY
+
(
j
-
1
)
*
(
imageH
+
imageMaginY
),
imageW
,
imageH
);
}
else
{
j
=
(
i
+
2
)
/
2
;
imageView
.
frame
=
CGRectMake
(
imageMaginX
,
35
+
imageMaginY
+
(
j
-
1
)
*
(
imageH
+
imageMaginY
),
imageW
,
imageH
);
}
[
self
addSubview
:
imageView
];
}
UILabel
*
referenceLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
imageMaginX
,
40
+
answerRow
*
imageH
+
(
answerRow
+
1
)
*
imageMaginY
,
kScreenWidth
-
imageMaginX
*
2
,
25
)];
referenceLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
referenceLabel
.
textColor
=
kLightGray
;
referenceLabel
.
text
=
@"参考照片"
;
[
self
addSubview
:
referenceLabel
];
// 参考照片
for
(
int
i
=
0
;
i
<
referenceAttachments
.
count
;
i
++
)
{
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
init
];
NSDictionary
*
dict
=
(
NSDictionary
*
)
referenceAttachments
[
i
];
NSURL
*
imageUrl
=
[
NSURL
URLWithString
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
dict
[
@"fileUrl"
]]];
[
imageView
sd_setImageWithURL
:
imageUrl
placeholderImage
:[
UIImage
imageNamed
:
@"default_pic"
]];
int
j
=
0
;
if
((
i
+
1
)
%
2
==
0
)
{
j
=
(
i
+
1
)
/
2
;
imageView
.
frame
=
CGRectMake
(
imageMaginX
+
(
imageW
+
imageMaginX
),
65
+
answerRow
*
imageH
+
(
answerRow
+
1
)
*
imageMaginY
+
imageMaginY
+
(
j
-
1
)
*
(
imageH
+
imageMaginY
),
imageW
,
imageH
);
}
else
{
j
=
(
i
+
2
)
/
2
;
imageView
.
frame
=
CGRectMake
(
imageMaginX
,
65
+
answerRow
*
imageH
+
(
answerRow
+
1
)
*
imageMaginY
+
imageMaginY
+
(
j
-
1
)
*
(
imageH
+
imageMaginY
),
imageW
,
imageH
);
}
[
self
addSubview
:
imageView
];
}
// 备注
UILabel
*
remarkLanel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
imageMaginX
,
65
+
answerRow
*
imageH
+
(
answerRow
+
1
)
*
imageMaginY
+
referenceRow
*
imageH
+
(
referenceRow
+
1
)
*
imageMaginY
,
kScreenWidth
-
imageMaginX
*
2
,
25
)];
remarkLanel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
remarkLanel
.
textColor
=
kLightGray
;
remarkLanel
.
text
=
@"备注"
;
[
self
addSubview
:
remarkLanel
];
// 背景ImageView
UIImageView
*
bgImageView
=
[[
UIImageView
alloc
]
init
];
bgImageView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
UIImage
*
image
=
[
UIImage
imageNamed
:
@"textbox"
];
UIImage
*
resizingName
=
[
image
resizableImageWithCapInsets
:
UIEdgeInsetsMake
(
1
,
1
,
24
,
24
)
resizingMode
:
UIImageResizingModeStretch
];
bgImageView
.
image
=
resizingName
;
[
self
addSubview
:
bgImageView
];
NSLayoutConstraint
*
overDateTop
=
[
NSLayoutConstraint
constraintWithItem
:
bgImageView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
remarkLanel
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
overDateTop
];
NSLayoutConstraint
*
overDateLeft
=
[
NSLayoutConstraint
constraintWithItem
:
bgImageView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
20
];
[
self
addConstraint
:
overDateLeft
];
NSLayoutConstraint
*
overDateRight
=
[
NSLayoutConstraint
constraintWithItem
:
bgImageView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
addConstraint
:
overDateRight
];
NSLayoutConstraint
*
overDateWidth
=
[
NSLayoutConstraint
constraintWithItem
:
bgImageView
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
70
];
[
self
addConstraint
:
overDateWidth
];
// textView
UITextView
*
textView
=
[[
UITextView
alloc
]
init
];
textView
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
remark
];
textView
.
backgroundColor
=
[
UIColor
clearColor
];
textView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
bgImageView
addSubview
:
textView
];
NSLayoutConstraint
*
textViewTop
=
[
NSLayoutConstraint
constraintWithItem
:
textView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
bgImageView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
1
];
[
bgImageView
addConstraint
:
textViewTop
];
NSLayoutConstraint
*
textViewLeft
=
[
NSLayoutConstraint
constraintWithItem
:
textView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
bgImageView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
1
];
[
bgImageView
addConstraint
:
textViewLeft
];
NSLayoutConstraint
*
textViewRight
=
[
NSLayoutConstraint
constraintWithItem
:
textView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
bgImageView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
1
];
[
bgImageView
addConstraint
:
textViewRight
];
NSLayoutConstraint
*
textViewWidth
=
[
NSLayoutConstraint
constraintWithItem
:
textView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
bgImageView
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:-
1
];
[
bgImageView
addConstraint
:
textViewWidth
];
// 返回上一页
UIButton
*
returnButton
=
[[
UIButton
alloc
]
init
];
returnButton
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
returnButton
.
backgroundColor
=
kNavigationBarColor
;
returnButton
.
layer
.
cornerRadius
=
4
;
[
returnButton
setTitleColor
:[
UIColor
whiteColor
]
forState
:
UIControlStateNormal
];
[
returnButton
setTitle
:
@"返回上一页面"
forState
:
UIControlStateNormal
];
returnButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
20
.
0
];
[
returnButton
addTarget
:
self
action
:
@selector
(
returnClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
addSubview
:
returnButton
];
NSLayoutConstraint
*
returnButtonTop
=
[
NSLayoutConstraint
constraintWithItem
:
returnButton
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
bgImageView
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
10
];
[
self
addConstraint
:
returnButtonTop
];
NSLayoutConstraint
*
returnButtonLeft
=
[
NSLayoutConstraint
constraintWithItem
:
returnButton
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
20
];
[
self
addConstraint
:
returnButtonLeft
];
NSLayoutConstraint
*
returnButtonRight
=
[
NSLayoutConstraint
constraintWithItem
:
returnButton
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
addConstraint
:
returnButtonRight
];
NSLayoutConstraint
*
returnButtonHeight
=
[
NSLayoutConstraint
constraintWithItem
:
returnButton
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
40
];
[
self
addConstraint
:
returnButtonHeight
];
}
return
self
;
}
-
(
void
)
returnClick
:(
UIButton
*
)
sender
{
if
(
_delegate
)
{
[
_delegate
returnParentsViewController
];
}
}
#pragma - lazy loading
-
(
UILabel
*
)
titleLabel
{
if
(
!
_titleLabel
)
{
_titleLabel
=
[[
UILabel
alloc
]
init
];
_titleLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_titleLabel
.
textColor
=
kLightGray
;
[
self
addSubview
:
_titleLabel
];
NSLayoutConstraint
*
overDateTop
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
10
];
[
self
addConstraint
:
overDateTop
];
NSLayoutConstraint
*
overDateLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
20
];
[
self
addConstraint
:
overDateLeft
];
NSLayoutConstraint
*
overDateRight
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
addConstraint
:
overDateRight
];
NSLayoutConstraint
*
overDateWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
25
];
[
self
addConstraint
:
overDateWidth
];
}
return
_titleLabel
;
}
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/ViewController/InspectNotUploadViewController.h
0 → 100644
View file @
fc6efa4b
//
// InspectNotUploadViewController.h
// redstar
//
// Created by admin on 15/11/24.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "TaskModel.h"
@interface
InspectNotUploadViewController
:
UIViewController
@property
(
nonatomic
,
assign
)
int
questionCount
;
@property
(
nonatomic
,
strong
)
TaskModel
*
taskModel
;
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/ViewController/Inspect
Settle
ViewController.m
→
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/ViewController/Inspect
NotUpload
ViewController.m
View file @
fc6efa4b
//
// Inspect
Settle
ViewController.m
// Inspect
NotUpload
ViewController.m
// redstar
//
// Created by admin on 15/11/4.
// Created by admin on 15/11/
2
4.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "InspectSettleViewController.h"
#import "InspectSettleCell.h"
#import "InspectDetailFooterView.h"
#import "InspectNotUploadViewController.h"
#import "InspectNotUpLoadCell.h"
#import "CheckPicViewController.h"
#import "InspectDetailFooterView.h"
#import "HttpClient.h"
#define kInspect
SettleCell @"InspectSettle
Cell"
#define kInspect
NotUploadCell @"InspectNotUpload
Cell"
@interface
Inspect
SettleViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
TakePhotoViewDelegate
,
UINavigationControllerDelegate
,
UIImagePickerController
Delegate
>
@interface
Inspect
NotUploadViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UINavigationControllerDelegate
,
UIImagePickerControllerDelegate
,
TakePhotoView
Delegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
InspectDetailFooterView
*
footerView
;
@end
@implementation
InspectSettleViewController
-
(
void
)
viewDidLoad
{
@implementation
InspectNotUploadViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
100
,
30
)];
...
...
@@ -41,12 +43,8 @@
UIBarButtonItem
*
backItem
=
[[
UIBarButtonItem
alloc
]
initWithCustomView
:
backBtn
];
self
.
navigationItem
.
leftBarButtonItem
=
backItem
;
[
self
.
tableView
registerClass
:[
InspectSettleCell
class
]
forCellReuseIdentifier
:
kInspectSettleCell
];
[
self
.
tableView
registerClass
:[
InspectNotUpLoadCell
class
]
forCellReuseIdentifier
:
kInspectNotUploadCell
];
self
.
tableView
.
tableFooterView
=
self
.
footerView
;
self
.
footerView
.
takePhotoView
.
delegate
=
self
;
}
...
...
@@ -135,6 +133,8 @@
[
picker
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}
#pragma mark - TableView Delegate/DataSource
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
...
...
@@ -145,34 +145,18 @@
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
Inspect
SettleCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kInspectSettle
Cell
];
Inspect
NotUpLoadCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kInspectNotUpload
Cell
];
if
(
!
cell
)
{
cell
=
[[
Inspect
SettleCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kInspectSettle
Cell
];
cell
=
[[
Inspect
NotUpLoadCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kInspectNotUpload
Cell
];
}
cell
.
titleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_taskModel
.
title
];
cell
.
titleDetailLabel
.
text
=
[
NSString
stringWithFormat
:
@"要求图片%d张"
,
_taskModel
.
attachmentNumber
];
cell
.
introLabel
.
text
=
@"参考说明"
;
cell
.
introDetailLabel
.
text
=
[
self
filterHTML
:[
NSString
stringWithFormat
:
@"%@"
,
_taskModel
.
reference
]
];
cell
.
introDetailLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_taskModel
.
reference
];
return
cell
;
}
-
(
NSString
*
)
filterHTML
:
(
NSString
*
)
html
{
NSScanner
*
scanner
=
[
NSScanner
scannerWithString
:
html
];
NSString
*
text
=
nil
;
while
([
scanner
isAtEnd
]
==
NO
)
{
//找到标签的起始位置
[
scanner
scanUpToString
:
@"<"
intoString
:
nil
];
//找到标签的结束位置
[
scanner
scanUpToString
:
@">"
intoString
:
&
text
];
//替换字符
html
=
[
html
stringByReplacingOccurrencesOfString
:[
NSString
stringWithFormat
:
@"%@>"
,
text
]
withString
:
@""
];
}
// NSString * regEx = @"<([^>]*)>";
// html = [html stringByReplacingOccurrencesOfString:regEx withString:@""];
return
html
;
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
...
...
@@ -203,7 +187,7 @@
_tableView
.
showsVerticalScrollIndicator
=
NO
;
_tableView
.
showsHorizontalScrollIndicator
=
NO
;
_tableView
.
rowHeight
=
UITableViewAutomaticDimension
;
_tableView
.
estimatedRowHeight
=
2
00
.
0
;
_tableView
.
estimatedRowHeight
=
3
00
.
0
;
[
self
.
view
addSubview
:
_tableView
];
NSLayoutConstraint
*
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
...
...
@@ -233,4 +217,14 @@
[
self
.
view
endEditing
:
YES
];
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/ViewController/Inspect
Settle
ViewController.h
→
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/ViewController/Inspect
Uploaded
ViewController.h
View file @
fc6efa4b
//
// Inspect
Settle
ViewController.h
// Inspect
Uploaded
ViewController.h
// redstar
//
// Created by admin on 15/11/4.
// Created by admin on 15/11/
2
4.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "TaskModel.h"
@interface
Inspect
SettleViewController
:
UIViewController
@interface
Inspect
UploadedViewController
:
UIViewController
@property
(
nonatomic
,
assign
)
int
questionCount
;
@property
(
nonatomic
,
strong
)
TaskModel
*
taskModel
;
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/ViewController/InspectUploadedViewController.m
0 → 100644
View file @
fc6efa4b
//
// InspectUploadedViewController.m
// redstar
//
// Created by admin on 15/11/24.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "InspectUploadedViewController.h"
#import "InspectNotUpLoadCell.h"
#import "InspectUpLoadFootView.h"
#define kInspectnotLoadTableViewCell @"InspectnotLoadTableViewCell"
#define kInspectReferencePicCell @"InspectReferencePiccell"
@interface
InspectUploadedViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
InspectUpLoadFootDelegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
InspectUpLoadFootView
*
footerView
;
@end
@implementation
InspectUploadedViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
view
.
backgroundColor
=
kSectionBackGroundColor
;
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
100
,
30
)];
[
customLab
setTextColor
:[
UIColor
whiteColor
]];
customLab
.
textAlignment
=
NSTextAlignmentCenter
;
[
customLab
setText
:[
NSString
stringWithFormat
:
@"检查点--%@(%@/%d)"
,
self
.
taskModel
.
category
,
self
.
taskModel
.
lineNo
,
self
.
questionCount
]];
customLab
.
font
=
[
UIFont
boldSystemFontOfSize
:
19
];
self
.
navigationItem
.
titleView
=
customLab
;
UIButton
*
backBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
backBtn
.
frame
=
CGRectMake
(
0
,
0
,
30
,
44
);
[
backBtn
setImage
:[
UIImage
imageNamed
:
@"back_btn"
]
forState
:
UIControlStateNormal
];
[
backBtn
addTarget
:
self
action
:
@selector
(
doBack
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
UIBarButtonItem
*
backItem
=
[[
UIBarButtonItem
alloc
]
initWithCustomView
:
backBtn
];
self
.
navigationItem
.
leftBarButtonItem
=
backItem
;
[
self
.
tableView
registerClass
:[
InspectNotUpLoadCell
class
]
forCellReuseIdentifier
:
kInspectnotLoadTableViewCell
];
self
.
tableView
.
tableFooterView
=
self
.
footerView
;
_tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
#pragma mark - private Methods
// 返回上一页面
-
(
void
)
doBack
:
(
UIBarButtonItem
*
)
sender
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
#pragma mark - TableView Delegate/DataSource
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
1
;
}
// cell显示的内容
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
InspectNotUpLoadCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kInspectnotLoadTableViewCell
];
if
(
!
cell
)
{
cell
=
[[
InspectNotUpLoadCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kInspectnotLoadTableViewCell
];
}
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
titleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_taskModel
.
title
];
cell
.
titleDetailLabel
.
text
=
[
NSString
stringWithFormat
:
@"要求图片%d张"
,
_taskModel
.
attachmentNumber
];
cell
.
introLabel
.
text
=
@"参考说明"
;
cell
.
introDetailLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_taskModel
.
reference
];
return
cell
;
}
// section高度
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
return
0
;
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForFooterInSection
:
(
NSInteger
)
section
{
return
CGFLOAT_MIN
;
}
#pragma mark - InspectFootDelegate
-
(
void
)
returnParentsViewController
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
#pragma mark - lazy loading
-
(
UITableView
*
)
tableView
{
if
(
!
_tableView
)
{
_tableView
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectZero
];
_tableView
.
backgroundColor
=
kSectionBackGroundColor
;
_tableView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_tableView
.
delegate
=
self
;
_tableView
.
dataSource
=
self
;
_tableView
.
showsVerticalScrollIndicator
=
NO
;
_tableView
.
showsHorizontalScrollIndicator
=
NO
;
_tableView
.
rowHeight
=
UITableViewAutomaticDimension
;
_tableView
.
estimatedRowHeight
=
200
.
0
;
[
self
.
view
addSubview
:
_tableView
];
NSLayoutConstraint
*
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableTop
];
NSLayoutConstraint
*
tableLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableLeft
];
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableRight
];
NSLayoutConstraint
*
tableBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableBottom
];
}
return
_tableView
;
}
-
(
void
)
touchesEnded
:
(
NSSet
*
)
touches
withEvent
:
(
UIEvent
*
)
event
{
[
self
.
view
endEditing
:
YES
];
}
-
(
InspectUpLoadFootView
*
)
footerView
{
if
(
!
_footerView
)
{
_footerView
=
[[
InspectUpLoadFootView
alloc
]
initWithAnswerAttachments
:
self
.
taskModel
.
answerAttachments
referenceAttachments
:
self
.
taskModel
.
referenceAttachments
remark
:
self
.
taskModel
.
remark
];
_footerView
.
delegate
=
self
;
}
return
_footerView
;
}
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/ViewController/InspectTaskViewController.m
View file @
fc6efa4b
...
...
@@ -7,7 +7,6 @@
//
#import "InspectTaskViewController.h"
#import "InspectSettleViewController.h"
#import "InspectDetailView.h"
#import "InspectSortTableCell.h"
...
...
@@ -21,6 +20,9 @@
#import "TaskDetailModel.h"
#import <MBProgressHUD.h>
#import "InspectNotUploadViewController.h"
#import "InspectUploadedViewController.h"
#define kTaskSortCell @"InspectTaskSortCell"
...
...
@@ -161,12 +163,15 @@
TaskModel
*
task
=
taskGroup
.
answers
[
indexPath
.
row
];
if
(
task
.
readonly
)
{
Inspect
SettleViewController
*
inspectVC
=
[[
InspectSettle
ViewController
alloc
]
init
];
Inspect
UploadedViewController
*
inspectVC
=
[[
InspectUploaded
ViewController
alloc
]
init
];
inspectVC
.
questionCount
=
taskGroup
.
questionCount
;
inspectVC
.
taskModel
=
task
;
[
self
.
navigationController
pushViewController
:
inspectVC
animated
:
YES
];
}
else
{
InspectNotUploadViewController
*
inspectNotVC
=
[[
InspectNotUploadViewController
alloc
]
init
];
inspectNotVC
.
questionCount
=
taskGroup
.
questionCount
;
inspectNotVC
.
taskModel
=
task
;
[
self
.
navigationController
pushViewController
:
inspectNotVC
animated
:
YES
];
}
...
...
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