Commit 76ece84e authored by admin's avatar admin

修复图片放大问题

parent 540d7b37
......@@ -8,10 +8,9 @@
#ifndef Url_h
#define Url_h
// url 测试环境
// #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/"
......
......@@ -361,29 +361,40 @@
#pragma mark - UITableView DataSource/Delegate
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
if ([self.titleStr isEqualToString:CategrayTitle]) {
// if ([self.titleStr isEqualToString:CategrayTitle]) {
// return 4;
// } else {
// return 3;
// }
return 4;
} else {
return 3;
}
}
- (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) {
return 1;
} else if (section == 1) {
return _picTextArray.count;
} else {
if ([self.titleStr isEqualToString:CategrayTitle]) {
if (section == 2) {
} else if (section == 2) {
return _attachmentArray.count;
} else {
return _allCommentArray.count;
}
}
return _allCommentArray.count;
}
}
// cell显示的内容
......@@ -462,11 +473,7 @@
cell.descriptionLabel.text = picText.describeStr;
return cell;
}
} else {
// 判断当前页面是否为 口碑巡店
if ([self.titleStr isEqualToString:CategrayTitle]) {
// 是 口碑巡店
if (indexPath.section == 2) {
} else if (indexPath.section == 2) {
// 显示 附件cell
AttachmentTableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:kAttachmentTableViwCell];
......@@ -508,17 +515,17 @@
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;
}
}
// } 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
......@@ -648,12 +655,12 @@
// 自定义section
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
NSInteger num = 0;
if ([self.titleStr isEqualToString:CategrayTitle]) {
num = 3;
} else {
num = 2;
}
NSInteger num = 3;
// if ([self.titleStr isEqualToString:CategrayTitle]) {
// num = 3;
// } else {
// num = 2;
// }
if (section == num) {
// 创建sectionView
UIView *sectionView = [[UIView alloc] init];
......@@ -716,19 +723,19 @@
// section高度
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
if ([self.titleStr isEqualToString:CategrayTitle]) {
// if ([self.titleStr isEqualToString:CategrayTitle]) {
if (section == 3) {
return 50;
} else {
return CGFLOAT_MIN;
}
} else {
if (section == 2) {
return 50;
} else {
return CGFLOAT_MIN;
}
}
// } else {
// if (section == 2) {
// return 50;
// } else {
// return CGFLOAT_MIN;
// }
// }
}
......
......@@ -72,6 +72,7 @@
for (int i = 0; i < count; i++) {
UIImageView *imageView = [[UIImageView alloc] init];
imageView.userInteractionEnabled = YES;
imageView.tag = 1115 + i;
imageView.translatesAutoresizingMaskIntoConstraints = NO;
NSDictionary *imageDict = questionDetail.attachments[i];
......
......@@ -32,7 +32,7 @@
{
_questionDetail = questionDetail;
NSString *questionNameText = [NSString stringWithFormat:@"问题名称:%@", questionDetail.title];
NSString *questionNameText = [NSString stringWithFormat:@"联系方式:%@", questionDetail.title];
NSMutableAttributedString *questionNameAttr = [[NSMutableAttributedString alloc] initWithString:questionNameText];
[questionNameAttr addAttributes:@{NSForegroundColorAttributeName:kDetailCellDescribeTextColor,NSFontAttributeName:[UIFont systemFontOfSize:15.0f]} range:NSMakeRange(0,5)];
[questionNameAttr addAttributes:@{NSForegroundColorAttributeName:kdetailCellTitleColor,NSFontAttributeName:[UIFont systemFontOfSize:15.0f]} range:NSMakeRange(5,questionNameText.length - 5)];
......
......@@ -72,6 +72,7 @@
for (int i = 0; i < count; i++) {
UIImageView *imageView = [[UIImageView alloc] init];
imageView.userInteractionEnabled = YES;
imageView.tag = 1115 + i;
imageView.translatesAutoresizingMaskIntoConstraints = NO;
NSDictionary *imageDict = questionDetail.attachments[i];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment