Commit 81fb9af9 authored by admin's avatar admin

修改名称 完成2.4接口修改

parent d5c2a1ce
......@@ -15,7 +15,7 @@
#import "HttpClient.h"
#define kInspectNotUploadCell @"InspectNotUploadCell"
@interface InspectNotUploadViewController () <UITableViewDelegate, UITableViewDataSource, UINavigationControllerDelegate, UIImagePickerControllerDelegate , TakePhotoViewDelegate>
@interface InspectNotUploadViewController () <UITableViewDelegate, UITableViewDataSource, UINavigationControllerDelegate, UIImagePickerControllerDelegate , TakePhotoViewDelegate, UIScrollViewDelegate>
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) InspectDetailFooterView *footerView;
......@@ -30,6 +30,9 @@
{
[super viewDidLoad];
NSLog(@"11111self.tableView.frame = %@, self.contentSize = %@, self.contentOff = %@", NSStringFromCGRect(self.tableView.frame),NSStringFromCGSize(self.tableView.contentSize), NSStringFromCGPoint(self.tableView.contentOffset));
UILabel *customLab = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 30)];
[customLab setTextColor:[UIColor whiteColor]];
customLab.textAlignment = NSTextAlignmentCenter;
......@@ -149,6 +152,7 @@
NSLog(@"dele fail");
}
}
}
- (void)createImagePicker
......@@ -214,6 +218,10 @@
self.footerView.height = self.footerView.takePhotoView.frame.size.height + 220;
// 退出图片选择控制器
[picker dismissViewControllerAnimated:YES completion:nil];
NSLog(@"222222self.tableView.frame = %@, self.contentSize = %@, self.contentOff = %@", NSStringFromCGRect(self.tableView.frame),NSStringFromCGSize(self.tableView.contentSize), NSStringFromCGPoint(self.tableView.contentOffset));
}
......@@ -267,8 +275,6 @@
_tableView.translatesAutoresizingMaskIntoConstraints = NO;
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.showsVerticalScrollIndicator = NO;
_tableView.showsHorizontalScrollIndicator = NO;
_tableView.rowHeight = UITableViewAutomaticDimension;
_tableView.estimatedRowHeight = 300.0;
[self.view addSubview:_tableView];
......
......@@ -20,4 +20,6 @@
@property (nonatomic, strong) UILabel *gradeLabel; // 排名
@property (nonatomic, strong) UIImageView *gradeImageView; // 排名
@property (nonatomic, strong) UIScrollView *showScrollView; // 轮播图
@property (nonatomic, strong) NSArray *storePictures;
@end
......@@ -12,5 +12,7 @@
@property (nonatomic, assign) NSInteger indexRow;
@property (nonatomic, copy) NSString *uuid;
@property (nonatomic, copy) NSString *store_uuid;
@property (nonatomic, copy) NSString *storeAddress;
@property (nonatomic, strong) NSArray *storePictures;
@end
......@@ -9,7 +9,7 @@
#import "RankDetailViewController.h"
#import "RankDetailTableCell.h"
#import "RankDetailHeaderView.h"
#import <UIButton+WebCache.h>
#import "RankHeadView.h"
#import <MBProgressHUD.h>
#import "HttpClient.h"
......@@ -112,9 +112,11 @@
}
_taskData = tgArray;
self.tableView.tableHeaderView = self.rankDetailHeaderView;
self.rankDetailHeaderView.rankDetailView.addressLabel.text = [NSString stringWithFormat:@"%@", self.storeAddress];
self.rankDetailHeaderView.rankDetailView.storePictures = self.storePictures;
[self.tableView registerClass:[RankDetailTableCell class] forCellReuseIdentifier:kRankDetailCell];
[self setupScrollView];
}];
......@@ -215,14 +217,17 @@
- (void)setupScrollView
{
int imageCount = 5;
int imageCount = (int)self.storePictures.count;
NSLog(@"self.storePicture = %@",self.storePictures);
CGFloat marginW = 5.0;
CGFloat imageViewW = 90 + 2 * marginW;
CGFloat imageViewH = self.rankDetailHeaderView.rankDetailView.showScrollView.bounds.size.height - 4;
self.rankDetailHeaderView.rankDetailView.showScrollView.contentSize = CGSizeMake(imageCount *imageViewW, imageViewH + 4);
for (int i = 0; i < imageCount; i++) {
UIButton *button = [[UIButton alloc] init];
[button setImage:[UIImage imageNamed:[NSString stringWithFormat:@"0%d", i]] forState:UIControlStateNormal];
NSDictionary *dict = (NSDictionary *)self.storePictures[i];
NSURL *imageUrl = [NSURL URLWithString:[NSString stringWithFormat:@"%@%@", kRedStarURL ,dict[@"fileUrl"]]];
[button sd_setImageWithURL:imageUrl forState:UIControlStateNormal placeholderImage:[UIImage imageNamed:@"default_pic"]];
button.frame = CGRectMake(i * imageViewW + 2, 2, imageViewW - 2 * marginW, imageViewH);
[button addTarget:self action:@selector(showBigPic:) forControlEvents:UIControlEventTouchUpInside];
[self.rankDetailHeaderView.rankDetailView.showScrollView addSubview:button];
......
......@@ -195,6 +195,8 @@
rankDetailVC.indexRow = indexPath.section;
rankDetailVC.uuid = rankList.uuid;
rankDetailVC.store_uuid = rankList.store_uuid;
rankDetailVC.storeAddress = rankList.storeAddress;
rankDetailVC.storePictures = rankList.storePictures;
[self.navigationController pushViewController:rankDetailVC animated:YES];
}
......
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