Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
X
xffruit
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
张杰
xffruit
Commits
55b6c85f
Commit
55b6c85f
authored
9 years ago
by
n22
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增图片放大功能
parent
ed0e8ffd
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
374 additions
and
39 deletions
+374
-39
project.pbxproj
XFFruit.xcodeproj/project.pbxproj
+24
-6
IBTConstants.h
XFFruit/Utilities/IBTUIKit/IBTConstants.h
+1
-0
SingleScrollView.h
...ntrollers/Survey/Views/GrowingTextView/SingleScrollView.h
+16
-0
SingleScrollView.m
...ntrollers/Survey/Views/GrowingTextView/SingleScrollView.m
+84
-0
TPCustomImageVIew.h
...trollers/Survey/Views/GrowingTextView/TPCustomImageVIew.h
+13
-0
TPCustomImageVIew.m
...trollers/Survey/Views/GrowingTextView/TPCustomImageVIew.m
+41
-0
ResultView.h
XFFruit/ViewControllers/Survey/Views/ResultView.h
+24
-0
ResultView.m
XFFruit/ViewControllers/Survey/Views/ResultView.m
+113
-0
ResultDetailViewController.m
...ntrollers/Survey/controllers/ResultDetailViewController.m
+27
-2
SurveyViewController.m
...ViewControllers/Survey/controllers/SurveyViewController.m
+31
-31
No files found.
XFFruit.xcodeproj/project.pbxproj
View file @
55b6c85f
...
@@ -347,6 +347,9 @@
...
@@ -347,6 +347,9 @@
FE2FCC881B7492C500BBC6FB
/* ResultDetailViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FE2FCC871B7492C500BBC6FB
/* ResultDetailViewController.m */
;
};
FE2FCC881B7492C500BBC6FB
/* ResultDetailViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FE2FCC871B7492C500BBC6FB
/* ResultDetailViewController.m */
;
};
FE2FCC8B1B74A9EE00BBC6FB
/* SurveyResultCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FE2FCC8A1B74A9EE00BBC6FB
/* SurveyResultCell.m */
;
};
FE2FCC8B1B74A9EE00BBC6FB
/* SurveyResultCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FE2FCC8A1B74A9EE00BBC6FB
/* SurveyResultCell.m */
;
};
FE4F17251B72FAAB00924DED
/* ChosePersonViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FE4F17241B72FAAB00924DED
/* ChosePersonViewController.m */
;
};
FE4F17251B72FAAB00924DED
/* ChosePersonViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FE4F17241B72FAAB00924DED
/* ChosePersonViewController.m */
;
};
FEAE16E91B79C9F9009D9E01
/* ResultView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FEAE16E81B79C9F9009D9E01
/* ResultView.m */
;
};
FEAE16EC1B79CAA0009D9E01
/* TPCustomImageVIew.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FEAE16EB1B79CAA0009D9E01
/* TPCustomImageVIew.m */
;
};
FEAE16EF1B79CAE3009D9E01
/* SingleScrollView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FEAE16EE1B79CAE3009D9E01
/* SingleScrollView.m */
;
};
/* End PBXBuildFile section */
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
/* Begin PBXContainerItemProxy section */
...
@@ -734,6 +737,12 @@
...
@@ -734,6 +737,12 @@
FE2FCC8A1B74A9EE00BBC6FB
/* SurveyResultCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SurveyResultCell.m
;
sourceTree
=
"<group>"
;
};
FE2FCC8A1B74A9EE00BBC6FB
/* SurveyResultCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SurveyResultCell.m
;
sourceTree
=
"<group>"
;
};
FE4F17231B72FAAB00924DED
/* ChosePersonViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ChosePersonViewController.h
;
sourceTree
=
"<group>"
;
};
FE4F17231B72FAAB00924DED
/* ChosePersonViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ChosePersonViewController.h
;
sourceTree
=
"<group>"
;
};
FE4F17241B72FAAB00924DED
/* ChosePersonViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ChosePersonViewController.m
;
sourceTree
=
"<group>"
;
};
FE4F17241B72FAAB00924DED
/* ChosePersonViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ChosePersonViewController.m
;
sourceTree
=
"<group>"
;
};
FEAE16E71B79C9F9009D9E01
/* ResultView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ResultView.h
;
sourceTree
=
"<group>"
;
};
FEAE16E81B79C9F9009D9E01
/* ResultView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ResultView.m
;
sourceTree
=
"<group>"
;
};
FEAE16EA1B79CAA0009D9E01
/* TPCustomImageVIew.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
TPCustomImageVIew.h
;
sourceTree
=
"<group>"
;
};
FEAE16EB1B79CAA0009D9E01
/* TPCustomImageVIew.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
TPCustomImageVIew.m
;
sourceTree
=
"<group>"
;
};
FEAE16ED1B79CAE3009D9E01
/* SingleScrollView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SingleScrollView.h
;
sourceTree
=
"<group>"
;
};
FEAE16EE1B79CAE3009D9E01
/* SingleScrollView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SingleScrollView.m
;
sourceTree
=
"<group>"
;
};
/* End PBXFileReference section */
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
/* Begin PBXFrameworksBuildPhase section */
...
@@ -838,6 +847,8 @@
...
@@ -838,6 +847,8 @@
7217E9E31B72364300FE5C1D
/* SurveyListCell.m */
,
7217E9E31B72364300FE5C1D
/* SurveyListCell.m */
,
FE2FCC891B74A9EE00BBC6FB
/* SurveyResultCell.h */
,
FE2FCC891B74A9EE00BBC6FB
/* SurveyResultCell.h */
,
FE2FCC8A1B74A9EE00BBC6FB
/* SurveyResultCell.m */
,
FE2FCC8A1B74A9EE00BBC6FB
/* SurveyResultCell.m */
,
FEAE16E71B79C9F9009D9E01
/* ResultView.h */
,
FEAE16E81B79C9F9009D9E01
/* ResultView.m */
,
);
);
path
=
Views
;
path
=
Views
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -845,6 +856,10 @@
...
@@ -845,6 +856,10 @@
7217E9D21B72364300FE5C1D
/* GrowingTextView */
=
{
7217E9D21B72364300FE5C1D
/* GrowingTextView */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
FEAE16ED1B79CAE3009D9E01
/* SingleScrollView.h */
,
FEAE16EE1B79CAE3009D9E01
/* SingleScrollView.m */
,
FEAE16EA1B79CAA0009D9E01
/* TPCustomImageVIew.h */
,
FEAE16EB1B79CAA0009D9E01
/* TPCustomImageVIew.m */
,
7217E9D31B72364300FE5C1D
/* HPGrowingTextView.h */
,
7217E9D31B72364300FE5C1D
/* HPGrowingTextView.h */
,
7217E9D41B72364300FE5C1D
/* HPGrowingTextView.m */
,
7217E9D41B72364300FE5C1D
/* HPGrowingTextView.m */
,
7217E9D51B72364300FE5C1D
/* HPTextViewInternal.h */
,
7217E9D51B72364300FE5C1D
/* HPTextViewInternal.h */
,
...
@@ -1969,11 +1984,13 @@
...
@@ -1969,11 +1984,13 @@
C123A8FD1B2561E1003C0C36
/* JTPopupView.m in Sources */
,
C123A8FD1B2561E1003C0C36
/* JTPopupView.m in Sources */
,
300DD94E1B184EA70080EE12
/* ICRQuestion.m in Sources */
,
300DD94E1B184EA70080EE12
/* ICRQuestion.m in Sources */
,
7217E9E81B72364300FE5C1D
/* Survey.m in Sources */
,
7217E9E81B72364300FE5C1D
/* Survey.m in Sources */
,
FEAE16EC1B79CAA0009D9E01
/* TPCustomImageVIew.m in Sources */
,
C1FE50561AE3587F00C18080
/* ICRAttachmentUnit.m in Sources */
,
C1FE50561AE3587F00C18080
/* ICRAttachmentUnit.m in Sources */
,
30D7494C1ACE340D00C63BA1
/* ICRModifyPwdViewController.m in Sources */
,
30D7494C1ACE340D00C63BA1
/* ICRModifyPwdViewController.m in Sources */
,
C10214CD1AD8FE200024637E
/* ICRStoreDetailViewController.m in Sources */
,
C10214CD1AD8FE200024637E
/* ICRStoreDetailViewController.m in Sources */
,
C142D2B81AC3A155000109A7
/* UIResponder+FirstResponder.m in Sources */
,
C142D2B81AC3A155000109A7
/* UIResponder+FirstResponder.m in Sources */
,
30D3C1251ADF6451004AC54E
/* ICRAnnouncementDetailContentView.m in Sources */
,
30D3C1251ADF6451004AC54E
/* ICRAnnouncementDetailContentView.m in Sources */
,
FEAE16E91B79C9F9009D9E01
/* ResultView.m in Sources */
,
C142D2C01AC3A155000109A7
/* UIView+ViewFrameGeometry.m in Sources */
,
C142D2C01AC3A155000109A7
/* UIView+ViewFrameGeometry.m in Sources */
,
C1FE50451AE0249A00C18080
/* IBTImagePicker.m in Sources */
,
C1FE50451AE0249A00C18080
/* IBTImagePicker.m in Sources */
,
C1E108611ADA8D3800620375
/* ICRAttachment.m in Sources */
,
C1E108611ADA8D3800620375
/* ICRAttachment.m in Sources */
,
...
@@ -1993,6 +2010,7 @@
...
@@ -1993,6 +2010,7 @@
7217E9F41B72364300FE5C1D
/* SurveyListCell.m in Sources */
,
7217E9F41B72364300FE5C1D
/* SurveyListCell.m in Sources */
,
C10214D21AD904F30024637E
/* ICRPatrolPlanViewController.m in Sources */
,
C10214D21AD904F30024637E
/* ICRPatrolPlanViewController.m in Sources */
,
C1E108591ADA53C700620375
/* ICRTaskResultViewController.m in Sources */
,
C1E108591ADA53C700620375
/* ICRTaskResultViewController.m in Sources */
,
FEAE16EF1B79CAE3009D9E01
/* SingleScrollView.m in Sources */
,
C10C909D1AE56E8700B911CD
/* JTOptionsViewController.m in Sources */
,
C10C909D1AE56E8700B911CD
/* JTOptionsViewController.m in Sources */
,
C1C5644F1AD6719B006A1050
/* ICRTaskDetailViewController.m in Sources */
,
C1C5644F1AD6719B006A1050
/* ICRTaskDetailViewController.m in Sources */
,
C1E1085D1ADA577500620375
/* ICRTaskDetailContentView.m in Sources */
,
C1E1085D1ADA577500620375
/* ICRTaskDetailContentView.m in Sources */
,
...
@@ -2229,7 +2247,7 @@
...
@@ -2229,7 +2247,7 @@
IPHONEOS_DEPLOYMENT_TARGET
=
7.0
;
IPHONEOS_DEPLOYMENT_TARGET
=
7.0
;
MTL_ENABLE_DEBUG_INFO
=
YES
;
MTL_ENABLE_DEBUG_INFO
=
YES
;
ONLY_ACTIVE_ARCH
=
YES
;
ONLY_ACTIVE_ARCH
=
YES
;
PROVISIONING_PROFILE
=
"
a12432a9-50b3-4cef-bae7-dcb35f965ce4
"
;
PROVISIONING_PROFILE
=
"
251ce065-a08f-44fd-bd52-f79372f4e47e
"
;
SDKROOT
=
iphoneos
;
SDKROOT
=
iphoneos
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
...
@@ -2267,7 +2285,7 @@
...
@@ -2267,7 +2285,7 @@
GCC_WARN_UNUSED_VARIABLE
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
IPHONEOS_DEPLOYMENT_TARGET
=
7.0
;
IPHONEOS_DEPLOYMENT_TARGET
=
7.0
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
PROVISIONING_PROFILE
=
"
a12432a9-50b3-4cef-bae7-dcb35f965ce4
"
;
PROVISIONING_PROFILE
=
"
251ce065-a08f-44fd-bd52-f79372f4e47e
"
;
SDKROOT
=
iphoneos
;
SDKROOT
=
iphoneos
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
...
@@ -2291,7 +2309,7 @@
...
@@ -2291,7 +2309,7 @@
"$(PROJECT_DIR)"
,
"$(PROJECT_DIR)"
,
);
);
PRODUCT_NAME
=
XFFruit
;
PRODUCT_NAME
=
XFFruit
;
PROVISIONING_PROFILE
=
"
a12432a9-50b3-4cef-bae7-dcb35f965ce4
"
;
PROVISIONING_PROFILE
=
"
251ce065-a08f-44fd-bd52-f79372f4e47e
"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
};
};
name
=
Debug
;
name
=
Debug
;
...
@@ -2312,7 +2330,7 @@
...
@@ -2312,7 +2330,7 @@
"$(PROJECT_DIR)"
,
"$(PROJECT_DIR)"
,
);
);
PRODUCT_NAME
=
XFFruit
;
PRODUCT_NAME
=
XFFruit
;
PROVISIONING_PROFILE
=
"
a12432a9-50b3-4cef-bae7-dcb35f965ce4
"
;
PROVISIONING_PROFILE
=
"
251ce065-a08f-44fd-bd52-f79372f4e47e
"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
};
};
name
=
Release
;
name
=
Release
;
...
@@ -2335,7 +2353,7 @@
...
@@ -2335,7 +2353,7 @@
INFOPLIST_FILE
=
XFFruitTests/Info.plist
;
INFOPLIST_FILE
=
XFFruitTests/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
;
PRODUCT_NAME
=
XFFruitTests
;
PRODUCT_NAME
=
XFFruitTests
;
PROVISIONING_PROFILE
=
"
a12432a9-50b3-4cef-bae7-dcb35f965ce4
"
;
PROVISIONING_PROFILE
=
"
251ce065-a08f-44fd-bd52-f79372f4e47e
"
;
TEST_HOST
=
"$(BUILT_PRODUCTS_DIR)/XFFruit.app/XFFruit"
;
TEST_HOST
=
"$(BUILT_PRODUCTS_DIR)/XFFruit.app/XFFruit"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
};
};
...
@@ -2355,7 +2373,7 @@
...
@@ -2355,7 +2373,7 @@
INFOPLIST_FILE
=
XFFruitTests/Info.plist
;
INFOPLIST_FILE
=
XFFruitTests/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
;
PRODUCT_NAME
=
XFFruitTests
;
PRODUCT_NAME
=
XFFruitTests
;
PROVISIONING_PROFILE
=
"
a12432a9-50b3-4cef-bae7-dcb35f965ce4
"
;
PROVISIONING_PROFILE
=
"
251ce065-a08f-44fd-bd52-f79372f4e47e
"
;
TEST_HOST
=
"$(BUILT_PRODUCTS_DIR)/XFFruit.app/XFFruit"
;
TEST_HOST
=
"$(BUILT_PRODUCTS_DIR)/XFFruit.app/XFFruit"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
};
};
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Utilities/IBTUIKit/IBTConstants.h
View file @
55b6c85f
...
@@ -91,6 +91,7 @@
...
@@ -91,6 +91,7 @@
#define ScreenSize ([[UIScreen mainScreen] bounds].size)
#define ScreenSize ([[UIScreen mainScreen] bounds].size)
#define IOS7 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)
#define IOS7 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)
#define FontSize(num) [UIFont systemFontOfSize:num]
#define FontSize(num) [UIFont systemFontOfSize:num]
#define AppWindow [[UIApplication sharedApplication].delegate window]
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Survey/Views/GrowingTextView/SingleScrollView.h
0 → 100755
View file @
55b6c85f
//
// SingleScrollView.h
// PhotoWallDemo
//
// Created by LZXuan on 14-8-18.
// Copyright (c) 2014年 LZXuan. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
SingleScrollView
:
UIScrollView
//
-
(
SingleScrollView
*
)
initWithFrame
:(
CGRect
)
frame
image
:(
NSString
*
)
image
;
//给自定义滚动时候增加双击和单击事件
-
(
void
)
addSingleClickTarget
:(
id
)
target
action
:(
SEL
)
action
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Survey/Views/GrowingTextView/SingleScrollView.m
0 → 100755
View file @
55b6c85f
//
// SingleScrollView.m
// PhotoWallDemo
//
// Created by LZXuan on 14-8-18.
// Copyright (c) 2014年 LZXuan. All rights reserved.
//
#import "SingleScrollView.h"
#import "UIImageView+WebCache.h"
#define SW 1
@interface
SingleScrollView
()
@property
(
nonatomic
,
assign
)
id
target
;
@property
(
nonatomic
,
assign
)
SEL
action
;
@property
(
nonatomic
,
assign
)
id
targetD
;
@property
(
nonatomic
,
assign
)
SEL
actionD
;
@end
@implementation
SingleScrollView
{
UIImageView
*
_imageView
;
}
-
(
id
)
initWithFrame
:
(
CGRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
// Initialization code
}
return
self
;
}
-
(
SingleScrollView
*
)
initWithFrame
:
(
CGRect
)
frame
image
:
(
NSString
*
)
image
{
if
(
self
=
[
super
initWithFrame
:
frame
])
{
self
.
showsHorizontalScrollIndicator
=
NO
;
self
.
showsVerticalScrollIndicator
=
NO
;
//设置最大放大倍数
self
.
minimumZoomScale
=
1
.
0
;
self
.
maximumZoomScale
=
2
.
0
;
//粘贴一张图片
_imageView
=
[[
UIImageView
alloc
]
init
];
_imageView
.
frame
=
CGRectMake
(
0
,
0
,
self
.
frame
.
size
.
width
-
10
*
2
,
self
.
frame
.
size
.
height
);
_imageView
.
center
=
CGPointMake
(
self
.
frame
.
size
.
width
/
2
,
self
.
frame
.
size
.
height
/
2
);
if
([
image
hasPrefix
:
@"http://"
])
{
NSURL
*
url
=
[
NSURL
URLWithString
:
image
];
[
_imageView
sd_setImageWithURL
:
url
placeholderImage
:[
UIImage
imageNamed
:
@"leftDetailBg.png"
]];
}
else
{
_imageView
.
image
=
[
UIImage
imageNamed
:
image
];
}
_imageView
.
contentMode
=
UIViewContentModeScaleAspectFit
;
[
self
addSubview
:
_imageView
];
}
return
self
;
}
-
(
void
)
addSingleClickTarget
:
(
id
)
target
action
:
(
SEL
)
action
{
self
.
target
=
target
;
self
.
action
=
action
;
UITapGestureRecognizer
*
tap
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
tap
:
)];
tap
.
numberOfTapsRequired
=
1
;
[
self
addGestureRecognizer
:
tap
];
// UIPinchGestureRecognizer *pinch = [[UIPinchGestureRecognizer alloc]
// initWithTarget:self action:@selector(pinch:)];
// [self addGestureRecognizer:pinch];
}
-
(
void
)
tap
:
(
UITapGestureRecognizer
*
)
tap
{
if
([
self
.
target
respondsToSelector
:
self
.
action
])
{
[
self
.
target
performSelector
:
self
.
action
withObject
:
self
];
}
}
//- (void)pinch:(UIPinchGestureRecognizer *)pinch{
// //通过触摸当前的图片视图 让目标对象指向目标对象的行为
// if ([self.target respondsToSelector:self.action]) {
// [self.target performSelector:self.action withObject:pinch withObject:self];
// }
//}
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Survey/Views/GrowingTextView/TPCustomImageVIew.h
0 → 100644
View file @
55b6c85f
//
// TPCustomImageVIew.h
// CNTaipingAgent
//
// Created by 陈俊俊 on 15/1/28.
// Copyright (c) 2015年 Taiping. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
TPCustomImageVIew
:
UIImageView
-
(
id
)
initwithTarget
:(
id
)
target
action
:(
SEL
)
action
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Survey/Views/GrowingTextView/TPCustomImageVIew.m
0 → 100644
View file @
55b6c85f
//
// TPCustomImageVIew.m
// CNTaipingAgent
//
// Created by 陈俊俊 on 15/1/28.
// Copyright (c) 2015年 Taiping. All rights reserved.
//
#import "TPCustomImageVIew.h"
@interface
TPCustomImageVIew
()
@property
(
nonatomic
,
assign
)
id
target
;
@property
(
nonatomic
,
assign
)
SEL
action
;
@end
@implementation
TPCustomImageVIew
-
(
id
)
initwithTarget
:(
id
)
target
action
:(
SEL
)
action
{
if
(
self
==
[
super
init
])
{
self
.
userInteractionEnabled
=
YES
;
UITapGestureRecognizer
*
tapRecongnizer
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
tap
)];
tapRecongnizer
.
numberOfTapsRequired
=
1
;
[
self
addGestureRecognizer
:
tapRecongnizer
];
self
.
target
=
target
;
self
.
action
=
action
;
}
return
self
;
}
-
(
void
)
tap
{
//通过触摸当前的图片视图 让目标对象指向目标对象的行为
if
([
self
.
target
respondsToSelector
:
self
.
action
])
{
[
self
.
target
performSelector
:
self
.
action
withObject
:
self
];
}
}
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Survey/Views/ResultView.h
0 → 100644
View file @
55b6c85f
//
// ResultView.h
// XFFruit
//
// Created by 陈俊俊 on 15/8/11.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol
ResultViewDelegate
<
NSObject
>
//scrollView点击事件
-
(
void
)
clickBackButton
;
@end
@interface
ResultView
:
UIView
@property
(
nonatomic
,
strong
)
NSArray
*
images
;
//外部传来的数组
@property
(
nonatomic
,
assign
)
NSInteger
index
;
//记录是哪个图片
@property
(
nonatomic
,
weak
)
id
<
ResultViewDelegate
>
delegate
;
-
(
void
)
setScrollView
;
//设置ScrollView
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Survey/Views/ResultView.m
0 → 100644
View file @
55b6c85f
//
// ResultView.m
// XFFruit
//
// Created by 陈俊俊 on 15/8/11.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ResultView.h"
#import "TPCustomImageVIew.h"
#import "UIImageView+WebCache.h"
#import "SingleScrollView.h"
#import "Attachment.h"
#define TPSamleVT_Top_Height 10
#define Back_Btn_Width 37
#define Back_Btn_Height 36
@interface
ResultView
()
<
UIScrollViewDelegate
,
UIGestureRecognizerDelegate
>
{
NSMutableArray
*
_imagesArray
;
UIScrollView
*
_scrollView
;
}
@end
@implementation
ResultView
-
(
id
)
initWithFrame
:(
CGRect
)
frame
{
if
(
self
=
[
super
initWithFrame
:
frame
])
{
_imagesArray
=
[
NSMutableArray
new
];
_scrollView
=
[[
UIScrollView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
TPSamleVT_Top_Height
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
-
TPSamleVT_Top_Height
*
2
)];
_scrollView
.
delegate
=
self
;
_scrollView
.
showsHorizontalScrollIndicator
=
NO
;
_scrollView
.
showsVerticalScrollIndicator
=
NO
;
_scrollView
.
pagingEnabled
=
YES
;
[
self
addSubview
:
_scrollView
];
}
return
self
;
}
-
(
void
)
setScrollView
{
[
self
setImagesArray
];
_scrollView
.
contentSize
=
CGSizeMake
(
_scrollView
.
frame
.
size
.
width
*
_imagesArray
.
count
,
_scrollView
.
frame
.
size
.
height
);
_scrollView
.
contentOffset
=
CGPointMake
(
_scrollView
.
frame
.
size
.
width
*
(
self
.
index
+
1
),
0
);
_scrollView
.
alpha
=
0
;
[
UIView
animateWithDuration
:
1
animations
:
^
{
_scrollView
.
alpha
=
1
;
}];
[
self
createImageButton
];
}
//创建滚动视图上的图片按钮
-
(
void
)
createImageButton
{
for
(
NSInteger
i
=
0
;
i
<
_imagesArray
.
count
;
i
++
)
{
SingleScrollView
*
customView
=
[[
SingleScrollView
alloc
]
initWithFrame
:
CGRectMake
(
_scrollView
.
frame
.
size
.
width
*
(
i
),
0
,
self
.
frame
.
size
.
width
,
_scrollView
.
frame
.
size
.
height
)
image
:
_imagesArray
[
i
]];
[
customView
addSingleClickTarget
:
self
action
:
@selector
(
imageViewHide
)];
customView
.
delegate
=
self
;
[
_scrollView
addSubview
:
customView
];
}
}
//为图片数组赋值
-
(
void
)
setImagesArray
{
[
_imagesArray
removeAllObjects
];
if
(
self
.
images
.
count
>
0
)
{
Attachment
*
att
=
[
self
.
images
lastObject
];
[
_imagesArray
addObject
:
att
.
content
];
for
(
Attachment
*
typeBo
in
self
.
images
)
{
[
_imagesArray
addObject
:
typeBo
.
content
];
}
Attachment
*
endTypeBo
=
self
.
images
[
0
];
[
_imagesArray
addObject
:
endTypeBo
.
content
];
}
else
{
[
_imagesArray
addObject
:
@"HomeDisplayImage"
];
[
_imagesArray
addObject
:
@"HomeDisplayImage"
];
[
_imagesArray
addObject
:
@"HomeDisplayImage"
];
}
}
#pragma mark - scrollView协议的方法
-
(
void
)
scrollViewDidEndDecelerating
:
(
UIScrollView
*
)
scrollView
{
float
offsetX
=
_scrollView
.
contentOffset
.
x
;
if
(
offsetX
/
_scrollView
.
frame
.
size
.
width
==
0
)
{
_scrollView
.
contentOffset
=
CGPointMake
(
scrollView
.
frame
.
size
.
width
*
(
_imagesArray
.
count
-
2
),
0
);
}
else
if
(
offsetX
/
scrollView
.
frame
.
size
.
width
==
_imagesArray
.
count
-
1
)
{
_scrollView
.
contentOffset
=
CGPointMake
(
scrollView
.
frame
.
size
.
width
*
1
,
0
);
}
if
(
!
[
scrollView
isKindOfClass
:[
SingleScrollView
class
]])
{
for
(
SingleScrollView
*
sv
in
scrollView
.
subviews
)
{
//如果 自定义的滚动视图 有放大 那么在滚动下方的滚动视图减速停止的时候 还原自定义滚动视图的大小
sv
.
zoomScale
=
1
;
}
}
}
#pragma mark - 手势触发
-
(
UIView
*
)
viewForZoomingInScrollView
:
(
UIScrollView
*
)
scrollView
{
if
([
scrollView
isKindOfClass
:[
SingleScrollView
class
]])
{
return
scrollView
.
subviews
[
0
];
}
return
nil
;
}
#pragma mark - 按钮触发事件
-
(
void
)
imageViewHide
{
[
self
.
delegate
clickBackButton
];
}
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Survey/controllers/ResultDetailViewController.m
View file @
55b6c85f
...
@@ -9,11 +9,14 @@
...
@@ -9,11 +9,14 @@
#import "ResultDetailViewController.h"
#import "ResultDetailViewController.h"
#import "SurveyResult.h"
#import "SurveyResult.h"
#import "SurveyResultCell.h"
#import "SurveyResultCell.h"
#import "ResultView.h"
#define TableHeight 150
#define TableHeight 150
@interface
ResultDetailViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
>
#define BeginTag 6000
@interface
ResultDetailViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
ResultViewDelegate
>
{
{
UITableView
*
_tableView
;
UITableView
*
_tableView
;
NSMutableArray
*
_dataArr
;
NSMutableArray
*
_dataArr
;
ResultView
*
_resultView
;
}
}
@end
@end
...
@@ -65,7 +68,8 @@
...
@@ -65,7 +68,8 @@
if
(
_dataArr
.
count
>
0
)
{
if
(
_dataArr
.
count
>
0
)
{
SurveyResult
*
survey
=
_dataArr
[
indexPath
.
row
];
SurveyResult
*
survey
=
_dataArr
[
indexPath
.
row
];
cell
.
surveyResult
=
survey
;
cell
.
surveyResult
=
survey
;
cell
.
tag
=
indexPath
.
row
+
BeginTag
;
[
cell
.
imageBtn
addTarget
:
self
action
:
@selector
(
imageClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
}
}
return
cell
;
return
cell
;
}
}
...
@@ -73,6 +77,27 @@
...
@@ -73,6 +77,27 @@
return
TableHeight
;
return
TableHeight
;
}
}
-
(
void
)
imageClick
:
(
UIButton
*
)
btn
{
// SurveyResult *result = _dataArr[btn.tag - BeginTag];
//创建详情view
if
(
_resultView
==
nil
)
{
_resultView
=
[[
ResultView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
ScreenSize
.
height
)];
_resultView
.
delegate
=
self
;
_resultView
.
backgroundColor
=
RGBA
(
0
,
0
,
0
,
0
.
5
);
[
_resultView
setScrollView
];
[
AppWindow
addSubview
:
_resultView
];
}
}
#pragma mark - resultView协议方法
-
(
void
)
clickBackButton
{
if
(
_resultView
)
{
[
_resultView
removeFromSuperview
];
_resultView
=
nil
;
}
}
-
(
void
)
didReceiveMemoryWarning
{
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
[
super
didReceiveMemoryWarning
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Survey/controllers/SurveyViewController.m
View file @
55b6c85f
...
@@ -52,39 +52,39 @@ typedef enum : NSUInteger {
...
@@ -52,39 +52,39 @@ typedef enum : NSUInteger {
-
(
void
)
initData
{
-
(
void
)
initData
{
_dataArr
=
[
NSMutableArray
array
];
_dataArr
=
[
NSMutableArray
array
];
//保存
//
//保存
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
//
void(^succ)(id) = ^(id data) {
[
IBTLoadingView
hideHUDWithText
:
nil
];
//
[IBTLoadingView hideHUDWithText:nil];
NSLog
(
@"%@"
,
data
);
//
NSLog(@"%@",data);
};
//
};
void
(
^
fail
)(
id
)
=
^
(
id
data
)
{
//
void(^fail)(id) = ^(id data) {
[
IBTLoadingView
hideHUDWithText
:
nil
];
//
[IBTLoadingView hideHUDWithText:nil];
[
IBTLoadingView
showTips
:
data
];
//
[IBTLoadingView showTips:data];
};
//
};
[
IBTLoadingView
showProgressLabel
:
@"正在保存..."
];
//
[IBTLoadingView showProgressLabel:@"正在保存..."];
[[
ICRHTTPController
sharedController
]
querySurveyWithBillNUmberLinke
:
@"fdsfds"
state
:
@"initial"
titleLike
:
@"fds"
orderFiled
:
@"fdsafds"
orderDirection
:
@"asc"
page_number
:
1
page_size
:
10
success
:
succ
failure
:
fail
];
//
[[ICRHTTPController sharedController] querySurveyWithBillNUmberLinke:@"fdsfds" state:@"initial" titleLike:@"fds" orderFiled:@"fdsafds" orderDirection:@"asc" page_number:1 page_size:10 success:succ failure:fail];
// [[ICRHTTPController sharedController] getResultsWithSurveyUuid:@"111" success:succ failure:fail];
// [[ICRHTTPController sharedController] getResultsWithSurveyUuid:@"111" success:succ failure:fail];
//
for (NSInteger i = 0; i < 4; i++) {
for
(
NSInteger
i
=
0
;
i
<
4
;
i
++
)
{
//
Survey *survey = [[Survey alloc]init];
Survey
*
survey
=
[[
Survey
alloc
]
init
];
//
survey.title = @"南汇8424西瓜调研情况";
survey
.
title
=
@"南汇8424西瓜调研情况"
;
//
survey.billnumber = @"150605000001";
survey
.
billnumber
=
@"150605000001"
;
//
survey.productname = @"南汇842[100213]";
survey
.
productname
=
@"南汇842[100213]"
;
//
survey.productcode = @"22222222222";
survey
.
productcode
=
@"22222222222"
;
//
survey.remark = @"费卡接口浪格可放大文化大fdsaf缴费卡接口浪费缴费卡上就付款放假快乐撒即可书法家开发商";
survey
.
remark
=
@"费卡接口浪格可放大文化大fdsaf缴费卡接口浪费缴费卡上就付款放假快乐撒即可书法家开发商"
;
//
survey.begindate = [IBTCommon convertToDateFrom:@"2015.05.25"];
survey
.
begindate
=
[
IBTCommon
convertToDateFrom
:
@"2015.05.25"
];
//
survey.enddate = [IBTCommon convertToDateFrom:@"2015.08.06"];
survey
.
enddate
=
[
IBTCommon
convertToDateFrom
:
@"2015.08.06"
];
//
[_dataArr addObject:survey];
[
_dataArr
addObject
:
survey
];
//
if (i == 0) {
if
(
i
==
0
)
{
//
survey.state = @"saved";
survey
.
state
=
@"saved"
;
//
}else if (i == 1) {
}
else
if
(
i
==
1
)
{
//
survey.state = @"submitted";
survey
.
state
=
@"submitted"
;
//
}else if (i == 2) {
}
else
if
(
i
==
2
)
{
//
survey.state = @"insurvey";
survey
.
state
=
@"insurvey"
;
//
}else if (i == 3) {
}
else
if
(
i
==
3
)
{
//
survey.state = @"finished";
survey
.
state
=
@"finished"
;
//
}
}
//
}
}
}
}
-
(
void
)
createTableView
-
(
void
)
createTableView
{
{
...
...
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