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
76ece84e
Commit
76ece84e
authored
Jun 21, 2016
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复图片放大问题
parent
540d7b37
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
91 additions
and
83 deletions
+91
-83
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Url.h
redstar/Classes/Macro/Url.h
+1
-2
PictureStoryViewController.m
...PictureDetail/ViewController/PictureStoryViewController.m
+87
-80
QuestionDescribeCell.m
...ction/Question/QuestionDetail/Cell/QuestionDescribeCell.m
+1
-0
QuestionDetailCell.m
...unction/Question/QuestionDetail/Cell/QuestionDetailCell.m
+1
-1
QuestionUnsolveTableViewCell.m
.../Question/QuestionUnsolved/QuestionUnsolveTableViewCell.m
+1
-0
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
76ece84e
No preview for this file type
redstar/Classes/Macro/Url.h
View file @
76ece84e
...
@@ -8,10 +8,9 @@
...
@@ -8,10 +8,9 @@
#ifndef Url_h
#ifndef Url_h
#define Url_h
#define Url_h
// url 测试环境
// url 测试环境
// #define kRedStarURL @"http://218.244.151.129:7580/"
// #define kRedStarURL @"http://218.244.151.129:7580/"
#define kRedStarURL @"http://219.235.234.225:7580/"
#define kRedStarURL @"http://219.235.234.225:7580/"
// 最新正式环境
// 最新正式环境
// #define kRedStarURL @"http://219.235.234.212:7580/"
// #define kRedStarURL @"http://219.235.234.212:7580/"
...
...
redstar/Classes/Module/Function/Picture/PictureDetail/ViewController/PictureStoryViewController.m
View file @
76ece84e
...
@@ -361,29 +361,40 @@
...
@@ -361,29 +361,40 @@
#pragma mark - UITableView DataSource/Delegate
#pragma mark - UITableView DataSource/Delegate
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
{
if
([
self
.
titleStr
isEqualToString
:
CategrayTitle
])
{
// if ([self.titleStr isEqualToString:CategrayTitle]) {
return
4
;
// return 4;
}
else
{
// } else {
return
3
;
// return 3;
}
// }
return
4
;
}
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
{
// if (section == 0) {
// return 1;
// } else if (section == 1) {
// return _picTextArray.count;
// } else {
// if ([self.titleStr isEqualToString:CategrayTitle]) {
// if (section == 2) {
// return _attachmentArray.count;
// } else {
// return _allCommentArray.count;
// }
// }
// return _allCommentArray.count;
// }
if
(
section
==
0
)
{
if
(
section
==
0
)
{
return
1
;
return
1
;
}
else
if
(
section
==
1
)
{
}
else
if
(
section
==
1
)
{
return
_picTextArray
.
count
;
return
_picTextArray
.
count
;
}
else
if
(
section
==
2
)
{
return
_attachmentArray
.
count
;
}
else
{
}
else
{
if
([
self
.
titleStr
isEqualToString
:
CategrayTitle
])
{
if
(
section
==
2
)
{
return
_attachmentArray
.
count
;
}
else
{
return
_allCommentArray
.
count
;
}
}
return
_allCommentArray
.
count
;
return
_allCommentArray
.
count
;
}
}
}
}
// cell显示的内容
// cell显示的内容
...
@@ -462,63 +473,59 @@
...
@@ -462,63 +473,59 @@
cell
.
descriptionLabel
.
text
=
picText
.
describeStr
;
cell
.
descriptionLabel
.
text
=
picText
.
describeStr
;
return
cell
;
return
cell
;
}
}
}
else
{
}
else
if
(
indexPath
.
section
==
2
)
{
// 判断当前页面是否为 口碑巡店
// 显示 附件cell
if
([
self
.
titleStr
isEqualToString
:
CategrayTitle
])
{
// 是 口碑巡店
AttachmentTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kAttachmentTableViwCell
];
if
(
indexPath
.
section
==
2
)
{
if
(
!
cell
)
{
// 显示 附件cell
cell
=
[[
AttachmentTableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kAttachmentTableViwCell
];
}
AttachmentTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kAttachmentTableViwCell
];
AttachmentModel
*
atta
=
_attachmentArray
[
indexPath
.
row
];
if
(
!
cell
)
{
NSString
*
name
=
atta
.
fileName
;
cell
=
[[
AttachmentTableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kAttachmentTableViwCell
];
[
cell
.
nameBtn
setTitle
:
name
forState
:
UIControlStateNormal
];
}
cell
.
nameBtn
.
titleLabel
.
numberOfLines
=
0
;
AttachmentModel
*
atta
=
_attachmentArray
[
indexPath
.
row
];
NSString
*
name
=
atta
.
fileName
;
[
cell
.
nameBtn
addTarget
:
self
action
:
@selector
(
showFile
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
nameBtn
setTitle
:
name
forState
:
UIControlStateNormal
];
[
cell
.
downloadBtn
addTarget
:
self
action
:
@selector
(
downloadFile
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
cell
.
nameBtn
.
titleLabel
.
numberOfLines
=
0
;
cell
.
downloadBtn
.
tag
=
998473
+
indexPath
.
row
;
cell
.
nameBtn
.
tag
=
998473
+
indexPath
.
row
;
[
cell
.
nameBtn
addTarget
:
self
action
:
@selector
(
showFile
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
downloadBtn
addTarget
:
self
action
:
@selector
(
downloadFile
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
NSArray
*
paths
=
NSSearchPathForDirectoriesInDomains
(
NSDocumentDirectory
,
NSUserDomainMask
,
YES
);
cell
.
downloadBtn
.
tag
=
998473
+
indexPath
.
row
;
NSString
*
path
=
paths
.
lastObject
;
cell
.
nameBtn
.
tag
=
998473
+
indexPath
.
row
;
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@/%@"
,
path
,
atta
.
fileName
];
NSArray
*
paths
=
NSSearchPathForDirectoriesInDomains
(
NSDocumentDirectory
,
NSUserDomainMask
,
YES
);
NSFileManager
*
fileManager
=
[
NSFileManager
defaultManager
];
NSString
*
path
=
paths
.
lastObject
;
if
([
fileManager
fileExistsAtPath
:
url
])
{
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@/%@"
,
path
,
atta
.
fileName
];
cell
.
downloadBtn
.
selected
=
YES
;
cell
.
downloadBtn
.
backgroundColor
=
[
UIColor
grayColor
];
NSFileManager
*
fileManager
=
[
NSFileManager
defaultManager
];
if
([
fileManager
fileExistsAtPath
:
url
])
{
cell
.
downloadBtn
.
selected
=
YES
;
cell
.
downloadBtn
.
backgroundColor
=
[
UIColor
grayColor
];
}
else
{
cell
.
downloadBtn
.
selected
=
NO
;
cell
.
downloadBtn
.
backgroundColor
=
[
UIColor
colorWithRed
:
47
/
255
.
0
green
:
209
/
255
.
0
blue
:
92
/
255
.
0
alpha
:
1
.
0
];
}
return
cell
;
}
else
{
// 显示 评论cell
PictureCommentTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kPictureCommentTableCell
];
if
(
!
cell
)
{
cell
=
[[
PictureCommentTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kPictureCommentTableCell
];
}
cell
.
comment
=
_allCommentArray
[
indexPath
.
row
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
}
}
else
{
}
else
{
// 评论
cell
.
downloadBtn
.
selected
=
NO
;
PictureCommentTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kPictureCommentTableCell
];
cell
.
downloadBtn
.
backgroundColor
=
[
UIColor
colorWithRed
:
47
/
255
.
0
green
:
209
/
255
.
0
blue
:
92
/
255
.
0
alpha
:
1
.
0
];
if
(
!
cell
)
{
cell
=
[[
PictureCommentTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kPictureCommentTableCell
];
}
}
return
cell
;
cell
.
comment
=
_allCommentArray
[
indexPath
.
row
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
}
else
{
return
cell
;
// 显示 评论cell
PictureCommentTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kPictureCommentTableCell
];
if
(
!
cell
)
{
cell
=
[[
PictureCommentTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kPictureCommentTableCell
];
}
}
cell
.
comment
=
_allCommentArray
[
indexPath
.
row
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
}
}
// } else {
// // 评论
// PictureCommentTableCell *cell=[tableView dequeueReusableCellWithIdentifier:kPictureCommentTableCell];
// if (!cell) {
// cell = [[PictureCommentTableCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kPictureCommentTableCell];
// }
// cell.comment = _allCommentArray[indexPath.row];
// cell.selectionStyle = UITableViewCellSelectionStyleNone;
// return cell;
// }
// }
}
}
-
(
void
)
showFile
:
(
UIButton
*
)
sender
-
(
void
)
showFile
:
(
UIButton
*
)
sender
...
@@ -648,12 +655,12 @@
...
@@ -648,12 +655,12 @@
// 自定义section
// 自定义section
-
(
UIView
*
)
tableView
:
(
UITableView
*
)
tableView
viewForHeaderInSection
:
(
NSInteger
)
section
-
(
UIView
*
)
tableView
:
(
UITableView
*
)
tableView
viewForHeaderInSection
:
(
NSInteger
)
section
{
{
NSInteger
num
=
0
;
NSInteger
num
=
3
;
if
([
self
.
titleStr
isEqualToString
:
CategrayTitle
])
{
//
if ([self.titleStr isEqualToString:CategrayTitle]) {
num
=
3
;
//
num = 3;
}
else
{
//
} else {
num
=
2
;
//
num = 2;
}
//
}
if
(
section
==
num
)
{
if
(
section
==
num
)
{
// 创建sectionView
// 创建sectionView
UIView
*
sectionView
=
[[
UIView
alloc
]
init
];
UIView
*
sectionView
=
[[
UIView
alloc
]
init
];
...
@@ -716,19 +723,19 @@
...
@@ -716,19 +723,19 @@
// section高度
// section高度
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
{
if
([
self
.
titleStr
isEqualToString
:
CategrayTitle
])
{
//
if ([self.titleStr isEqualToString:CategrayTitle]) {
if
(
section
==
3
)
{
if
(
section
==
3
)
{
return
50
;
return
50
;
}
else
{
}
else
{
return
CGFLOAT_MIN
;
return
CGFLOAT_MIN
;
}
}
}
else
{
//
} else {
if
(
section
==
2
)
{
//
if (section == 2) {
return
50
;
//
return 50;
}
else
{
//
} else {
return
CGFLOAT_MIN
;
//
return CGFLOAT_MIN;
}
//
}
}
//
}
}
}
...
...
redstar/Classes/Module/Function/Question/QuestionDetail/Cell/QuestionDescribeCell.m
View file @
76ece84e
...
@@ -72,6 +72,7 @@
...
@@ -72,6 +72,7 @@
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
init
];
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
init
];
imageView
.
userInteractionEnabled
=
YES
;
imageView
.
tag
=
1115
+
i
;
imageView
.
tag
=
1115
+
i
;
imageView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
imageView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
NSDictionary
*
imageDict
=
questionDetail
.
attachments
[
i
];
NSDictionary
*
imageDict
=
questionDetail
.
attachments
[
i
];
...
...
redstar/Classes/Module/Function/Question/QuestionDetail/Cell/QuestionDetailCell.m
View file @
76ece84e
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
{
{
_questionDetail
=
questionDetail
;
_questionDetail
=
questionDetail
;
NSString
*
questionNameText
=
[
NSString
stringWithFormat
:
@"
问题名称
:%@"
,
questionDetail
.
title
];
NSString
*
questionNameText
=
[
NSString
stringWithFormat
:
@"
联系方式
:%@"
,
questionDetail
.
title
];
NSMutableAttributedString
*
questionNameAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
questionNameText
];
NSMutableAttributedString
*
questionNameAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
questionNameText
];
[
questionNameAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kDetailCellDescribeTextColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
0
,
5
)];
[
questionNameAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kDetailCellDescribeTextColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
0
,
5
)];
[
questionNameAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kdetailCellTitleColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
5
,
questionNameText
.
length
-
5
)];
[
questionNameAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kdetailCellTitleColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
5
,
questionNameText
.
length
-
5
)];
...
...
redstar/Classes/Module/Function/Question/QuestionUnsolved/QuestionUnsolveTableViewCell.m
View file @
76ece84e
...
@@ -72,6 +72,7 @@
...
@@ -72,6 +72,7 @@
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
init
];
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
init
];
imageView
.
userInteractionEnabled
=
YES
;
imageView
.
tag
=
1115
+
i
;
imageView
.
tag
=
1115
+
i
;
imageView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
imageView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
NSDictionary
*
imageDict
=
questionDetail
.
attachments
[
i
];
NSDictionary
*
imageDict
=
questionDetail
.
attachments
[
i
];
...
...
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