Commit bcfa14c3 authored by 哈南's avatar 哈南

no message

parent 4285c42b
...@@ -249,6 +249,7 @@ ...@@ -249,6 +249,7 @@
29F5C49F1FCBB1220052CBF1 /* PYPhotoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F5C4901FCBB1220052CBF1 /* PYPhotoView.m */; }; 29F5C49F1FCBB1220052CBF1 /* PYPhotoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F5C4901FCBB1220052CBF1 /* PYPhotoView.m */; };
29F5C4A91FCBB3520052CBF1 /* UIViewController+StoryBoard.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F5C4A71FCBB3510052CBF1 /* UIViewController+StoryBoard.m */; }; 29F5C4A91FCBB3520052CBF1 /* UIViewController+StoryBoard.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F5C4A71FCBB3510052CBF1 /* UIViewController+StoryBoard.m */; };
29F9995C1D2E63C600090EBF /* UIImage+RTTint.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F9995B1D2E63C600090EBF /* UIImage+RTTint.m */; }; 29F9995C1D2E63C600090EBF /* UIImage+RTTint.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F9995B1D2E63C600090EBF /* UIImage+RTTint.m */; };
345335D9216B25AB006A9A59 /* ImageTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 345335D8216B25AA006A9A59 /* ImageTool.m */; };
3506E23B1C27E14700288B3E /* GTOBusinessSignInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 3506E23A1C27E14700288B3E /* GTOBusinessSignInfo.m */; }; 3506E23B1C27E14700288B3E /* GTOBusinessSignInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 3506E23A1C27E14700288B3E /* GTOBusinessSignInfo.m */; };
3506ECC41BA00E3400897EBE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3506ECC31BA00E3400897EBE /* main.m */; }; 3506ECC41BA00E3400897EBE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3506ECC31BA00E3400897EBE /* main.m */; };
3506ECCA1BA00E3400897EBE /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3506ECC91BA00E3400897EBE /* ViewController.m */; }; 3506ECCA1BA00E3400897EBE /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3506ECC91BA00E3400897EBE /* ViewController.m */; };
...@@ -935,6 +936,8 @@ ...@@ -935,6 +936,8 @@
29F5C4A81FCBB3510052CBF1 /* UIViewController+StoryBoard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+StoryBoard.h"; sourceTree = "<group>"; }; 29F5C4A81FCBB3510052CBF1 /* UIViewController+StoryBoard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+StoryBoard.h"; sourceTree = "<group>"; };
29F9995A1D2E63C600090EBF /* UIImage+RTTint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+RTTint.h"; sourceTree = "<group>"; }; 29F9995A1D2E63C600090EBF /* UIImage+RTTint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+RTTint.h"; sourceTree = "<group>"; };
29F9995B1D2E63C600090EBF /* UIImage+RTTint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+RTTint.m"; sourceTree = "<group>"; }; 29F9995B1D2E63C600090EBF /* UIImage+RTTint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+RTTint.m"; sourceTree = "<group>"; };
345335D7216B25AA006A9A59 /* ImageTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageTool.h; sourceTree = "<group>"; };
345335D8216B25AA006A9A59 /* ImageTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageTool.m; sourceTree = "<group>"; };
3506E2391C27E14700288B3E /* GTOBusinessSignInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTOBusinessSignInfo.h; sourceTree = "<group>"; }; 3506E2391C27E14700288B3E /* GTOBusinessSignInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTOBusinessSignInfo.h; sourceTree = "<group>"; };
3506E23A1C27E14700288B3E /* GTOBusinessSignInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTOBusinessSignInfo.m; sourceTree = "<group>"; }; 3506E23A1C27E14700288B3E /* GTOBusinessSignInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTOBusinessSignInfo.m; sourceTree = "<group>"; };
3506ECBE1BA00E3400897EBE /* total.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = total.app; sourceTree = BUILT_PRODUCTS_DIR; }; 3506ECBE1BA00E3400897EBE /* total.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = total.app; sourceTree = BUILT_PRODUCTS_DIR; };
...@@ -2949,6 +2952,8 @@ ...@@ -2949,6 +2952,8 @@
29603D841D1CDEA000951670 /* DetailsTimeSelect */, 29603D841D1CDEA000951670 /* DetailsTimeSelect */,
2978ED491D1BC64C00159B4A /* NSdateSelect */, 2978ED491D1BC64C00159B4A /* NSdateSelect */,
2978ED451D1BB02400159B4A /* Drop-downBox(单项选择) */, 2978ED451D1BB02400159B4A /* Drop-downBox(单项选择) */,
345335D7216B25AA006A9A59 /* ImageTool.h */,
345335D8216B25AA006A9A59 /* ImageTool.m */,
3547450D1BCFFA4F00361FFD /* GTOCommonTools.h */, 3547450D1BCFFA4F00361FFD /* GTOCommonTools.h */,
3547450E1BCFFA4F00361FFD /* GTOCommonTools.m */, 3547450E1BCFFA4F00361FFD /* GTOCommonTools.m */,
35FC363E1BCE52AA00C62137 /* ChooseViewController */, 35FC363E1BCE52AA00C62137 /* ChooseViewController */,
...@@ -3581,7 +3586,7 @@ ...@@ -3581,7 +3586,7 @@
3506ECBD1BA00E3400897EBE = { 3506ECBD1BA00E3400897EBE = {
CreatedOnToolsVersion = 6.4; CreatedOnToolsVersion = 6.4;
DevelopmentTeam = W54V2VB863; DevelopmentTeam = W54V2VB863;
ProvisioningStyle = Manual; ProvisioningStyle = Automatic;
SystemCapabilities = { SystemCapabilities = {
com.apple.BackgroundModes = { com.apple.BackgroundModes = {
enabled = 1; enabled = 1;
...@@ -4003,6 +4008,7 @@ ...@@ -4003,6 +4008,7 @@
35FC36331BCE1BD000C62137 /* GTONewAddPioneeringViewController.m in Sources */, 35FC36331BCE1BD000C62137 /* GTONewAddPioneeringViewController.m in Sources */,
29B501D81D1A8972003D4E74 /* FirstTableViewCell.m in Sources */, 29B501D81D1A8972003D4E74 /* FirstTableViewCell.m in Sources */,
3506ED5F1BA0164E00897EBE /* IBTWebProgressBar.m in Sources */, 3506ED5F1BA0164E00897EBE /* IBTWebProgressBar.m in Sources */,
345335D9216B25AB006A9A59 /* ImageTool.m in Sources */,
35D922CD1BAF9A6900D02338 /* ICRPostAttachment.m in Sources */, 35D922CD1BAF9A6900D02338 /* ICRPostAttachment.m in Sources */,
3506EDA31BA0166700897EBE /* JTRecordView.m in Sources */, 3506EDA31BA0166700897EBE /* JTRecordView.m in Sources */,
29F5C4461FCBAB410052CBF1 /* InspectionTableViewController.m in Sources */, 29F5C4461FCBAB410052CBF1 /* InspectionTableViewController.m in Sources */,
...@@ -4303,9 +4309,9 @@ ...@@ -4303,9 +4309,9 @@
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES; CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_ENTITLEMENTS = total/total.entitlements; CODE_SIGN_ENTITLEMENTS = total/total.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer: jie zhang (9V9955H2BK)"; CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = W54V2VB863; DEVELOPMENT_TEAM = W54V2VB863;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
...@@ -4322,8 +4328,8 @@ ...@@ -4322,8 +4328,8 @@
); );
PRODUCT_BUNDLE_IDENTIFIER = com.gomoe.total; PRODUCT_BUNDLE_IDENTIFIER = com.gomoe.total;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "6191b2a0-c443-4299-bfd2-2107e96949af"; PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "Total Fabu"; PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "total/total-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "total/total-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
...@@ -4339,9 +4345,9 @@ ...@@ -4339,9 +4345,9 @@
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES; CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_ENTITLEMENTS = total/total.entitlements; CODE_SIGN_ENTITLEMENTS = total/total.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer: jie zhang (9V9955H2BK)"; CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = W54V2VB863; DEVELOPMENT_TEAM = W54V2VB863;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
...@@ -4358,8 +4364,8 @@ ...@@ -4358,8 +4364,8 @@
); );
PRODUCT_BUNDLE_IDENTIFIER = com.gomoe.total; PRODUCT_BUNDLE_IDENTIFIER = com.gomoe.total;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "6191b2a0-c443-4299-bfd2-2107e96949af"; PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "Total Fabu"; PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "total/total-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "total/total-Bridging-Header.h";
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**"; USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
...@@ -55,9 +55,15 @@ static NSString * const reuseIdentifier = @"InspectionPhotoCollectionViewCell"; ...@@ -55,9 +55,15 @@ static NSString * const reuseIdentifier = @"InspectionPhotoCollectionViewCell";
PYPhotoBrowseView *photoBroseView = [[PYPhotoBrowseView alloc] init]; PYPhotoBrowseView *photoBroseView = [[PYPhotoBrowseView alloc] init];
photoBroseView.currentIndex = indexPath.item; photoBroseView.currentIndex = indexPath.item;
NSMutableArray *imageArray = [NSMutableArray array]; NSMutableArray *imageArray = [NSMutableArray array];
for (InspectionPhotoCollectionViewCell *cell in collectionView.visibleCells) { int number = (int)[collectionView numberOfItemsInSection:indexPath.section];
for (int index = 0;index < number;index++){
NSIndexPath *cellIndex = [NSIndexPath indexPathForItem:index inSection:indexPath.section];
InspectionPhotoCollectionViewCell *cell = (InspectionPhotoCollectionViewCell *)[collectionView cellForItemAtIndexPath:cellIndex];
[imageArray addObject:cell.inspectionImageView]; [imageArray addObject:cell.inspectionImageView];
} };
// for (InspectionPhotoCollectionViewCell *cell in collectionView.visibleCells) {
// [imageArray addObject:cell.inspectionImageView];
// }
photoBroseView.sourceImgageViews = imageArray; photoBroseView.sourceImgageViews = imageArray;
[photoBroseView show]; [photoBroseView show];
} }
......
...@@ -272,7 +272,6 @@ ...@@ -272,7 +272,6 @@
case ExamCellTypeScore: { case ExamCellTypeScore: {
PatrolExamScoreCell *cell = [tableView dequeueReusableCellWithIdentifier:@"PatrolExamScoreCell" forIndexPath:indexPath]; PatrolExamScoreCell *cell = [tableView dequeueReusableCellWithIdentifier:@"PatrolExamScoreCell" forIndexPath:indexPath];
cell.cellModel = cellVM; cell.cellModel = cellVM;
return cell; return cell;
} break; } break;
case ExamCellTypeAttachment: { case ExamCellTypeAttachment: {
......
//
// ImageTool.h
// besttoneMobile
//
// Created by Besttone on 16/12/6.
// Copyright © 2016年 Besttone. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface ImageTool : NSObject
+ (NSData *)zipImageWithUrl:(id)imageUrl;
+ (NSData *)zipImageWithUrl:(id)imageUrl maxSize:(CGFloat)size;
+ (NSData *)zipImageWithImage:(UIImage *)image maxSize:(CGFloat)size;
+ (CGFloat )getImageSize:(UIImage *)image;
+ (UIImage *)imageWithUrl:(id)imageUrl;
@end
//
// ImageTool.m
// besttoneMobile
//
// Created by Besttone on 16/12/6.
// Copyright © 2016年 Besttone. All rights reserved.
//
#import "ImageTool.h"
#import <UIKit/UIKit.h>
@implementation ImageTool
//对图片大小进行压缩至32K以下
+ (NSData *)zipImageWithUrl:(id)imageUrl
{
NSURL * url = [NSURL URLWithString:imageUrl];
if (url == nil){
url = [NSURL URLWithString:[imageUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
}
NSData * imageData = [[NSData alloc]initWithContentsOfURL:url];
CGFloat maxFileSize = 32*1024;
CGFloat compression = 0.9f;
CGFloat maxCompression = 0.1f;
UIImage *image = [UIImage imageWithData:imageData];
NSData *compressedData = UIImageJPEGRepresentation(image, compression);
while ([compressedData length] > maxFileSize && compression > maxCompression) {
compression -= 0.1;
compressedData = UIImageJPEGRepresentation(image, compression);
}
return compressedData;
}
+ (NSData *)zipImageWithUrl:(id)imageUrl maxSize:(CGFloat)size{
NSURL * url = [NSURL URLWithString:imageUrl];
if (url == nil){
url = [NSURL URLWithString:[imageUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
}
NSData * data = [[NSData alloc]initWithContentsOfURL:url];
UIImage *resultImage = [[UIImage alloc]initWithData:data];
NSUInteger lastDataLength = 0;
while (data.length > size && data.length != lastDataLength) {
lastDataLength = data.length;
CGFloat ratio = size / data.length;
CGSize size = CGSizeMake((NSUInteger)(resultImage.size.width * sqrtf(ratio)),
(NSUInteger)(resultImage.size.height * sqrtf(ratio)));
UIGraphicsBeginImageContext(size);
[resultImage drawInRect:CGRectMake(0, 0, size.width, size.height)];
resultImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
data = UIImageJPEGRepresentation(resultImage, 1);
}
return data;
}
+ (NSData *)zipImageWithImage:(UIImage *)image maxSize:(CGFloat)size{
UIImage *resultImage = image;
NSData *data = UIImageJPEGRepresentation(image, 0.8);
NSUInteger lastDataLength = 0;
while (data.length > size && data.length != lastDataLength) {
lastDataLength = data.length;
CGFloat ratio = size / data.length;
CGSize size = CGSizeMake((NSUInteger)(resultImage.size.width * sqrtf(ratio)),
(NSUInteger)(resultImage.size.height * sqrtf(ratio)));
UIGraphicsBeginImageContext(size);
[resultImage drawInRect:CGRectMake(0, 0, size.width, size.height)];
resultImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
data = UIImageJPEGRepresentation(resultImage, 1.0);
}
return data;
}
+ (CGFloat)getImageSize:(UIImage *)image{
NSData * compressedData = UIImageJPEGRepresentation(image, 1);
return [compressedData length];
}
+ (UIImage *)imageWithUrl:(id)imageUrl{
NSURL * url = [NSURL URLWithString:imageUrl];
if (url == nil){
url = [NSURL URLWithString:[imageUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
}
NSData * imageData = [[NSData alloc]initWithContentsOfURL:url];
return [UIImage imageWithData:imageData];
}
@end
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.3.9</string> <string>1.4.0</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -205,16 +205,16 @@ typedef NS_ENUM(NSInteger,ATTACHMENT_LOCATION){ ...@@ -205,16 +205,16 @@ typedef NS_ENUM(NSInteger,ATTACHMENT_LOCATION){
//测试环境 测试VI检查、VI抽查、VI检查结果模块使用 //测试环境 测试VI检查、VI抽查、VI检查结果模块使用
//#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:8180/total-server/rest" #define HTTP_REST_API_BASE_URL @"http://139.196.39.77:8180/total-server/rest"
//#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:8180" #define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:8180"
//#define VIHTTP_REST_API_BASE_URL @"http://139.196.39.77:8280/total-server/rest" #define VIHTTP_REST_API_BASE_URL @"http://139.196.39.77:8280/total-server/rest"
//#define VIHTTP_LOCAL_BASE_URL @"http://139.196.39.77:8280" #define VIHTTP_LOCAL_BASE_URL @"http://139.196.39.77:8280"
//正式环境 正式VI检查、VI抽查、VI检查结果模块使用 //正式环境 正式VI检查、VI抽查、VI检查结果模块使用
#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:7080/total-server/rest" //#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:7080/total-server/rest"
#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:7080" //#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:7080"
#define VIHTTP_REST_API_BASE_URL @"http://139.196.39.77:7280/total-server/rest" //#define VIHTTP_REST_API_BASE_URL @"http://139.196.39.77:7280/total-server/rest"
#define VIHTTP_LOCAL_BASE_URL @"http://139.196.39.77:7280" //#define VIHTTP_LOCAL_BASE_URL @"http://139.196.39.77:7280"
//开发环境 //开发环境
//#define HTTP_LOCAL_BASE_URL @"http://192.168.1.176:8083" //#define HTTP_LOCAL_BASE_URL @"http://192.168.1.176:8083"
......
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