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
b7edc038
Commit
b7edc038
authored
Aug 06, 2015
by
n22
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
选择人员
parent
708c7ada
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
267 additions
and
13 deletions
+267
-13
project.pbxproj
XFFruit.xcodeproj/project.pbxproj
+11
-5
Contents.json
XFFruit/Images.xcassets/Survey/delete.imageset/Contents.json
+21
-0
delete@2x.png
XFFruit/Images.xcassets/Survey/delete.imageset/delete@2x.png
+0
-0
Contents.json
XFFruit/Images.xcassets/Survey/search.imageset/Contents.json
+21
-0
search@2x.png
XFFruit/Images.xcassets/Survey/search.imageset/search@2x.png
+0
-0
Contents.json
...t/Images.xcassets/Survey/textFiled.imageset/Contents.json
+22
-0
textFiled.png
...t/Images.xcassets/Survey/textFiled.imageset/textFiled.png
+0
-0
textFiled@2x.png
...mages.xcassets/Survey/textFiled.imageset/textFiled@2x.png
+0
-0
BoltMaskView.m
XFFruit/ViewControllers/Survey/Views/BoltMaskView.m
+1
-1
MaskCell.h
XFFruit/ViewControllers/Survey/Views/MaskCell.h
+2
-1
MaskCell.m
XFFruit/ViewControllers/Survey/Views/MaskCell.m
+4
-3
SortMaskView.m
XFFruit/ViewControllers/Survey/Views/SortMaskView.m
+2
-2
ChosePersonViewController.h
...ontrollers/Survey/controllers/ChosePersonViewController.h
+18
-0
ChosePersonViewController.m
...ontrollers/Survey/controllers/ChosePersonViewController.m
+154
-0
NewSurveyViewController.m
...wControllers/Survey/controllers/NewSurveyViewController.m
+9
-0
SurveyViewController.m
...ViewControllers/Survey/controllers/SurveyViewController.m
+2
-1
No files found.
XFFruit.xcodeproj/project.pbxproj
View file @
b7edc038
...
@@ -341,6 +341,7 @@
...
@@ -341,6 +341,7 @@
C1FE50531AE024FA00C18080
/* UIAlertView+Blocks.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C1FE504D1AE024FA00C18080
/* UIAlertView+Blocks.m */
;
};
C1FE50531AE024FA00C18080
/* UIAlertView+Blocks.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C1FE504D1AE024FA00C18080
/* UIAlertView+Blocks.m */
;
};
C1FE50561AE3587F00C18080
/* ICRAttachmentUnit.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C1FE50551AE3587F00C18080
/* ICRAttachmentUnit.m */
;
};
C1FE50561AE3587F00C18080
/* ICRAttachmentUnit.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C1FE50551AE3587F00C18080
/* ICRAttachmentUnit.m */
;
};
C1FE50571AE3587F00C18080
/* ICRAttachmentUnit.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C1FE50551AE3587F00C18080
/* ICRAttachmentUnit.m */
;
};
C1FE50571AE3587F00C18080
/* ICRAttachmentUnit.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C1FE50551AE3587F00C18080
/* ICRAttachmentUnit.m */
;
};
FE4F17251B72FAAB00924DED
/* ChosePersonViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FE4F17241B72FAAB00924DED
/* ChosePersonViewController.m */
;
};
/* End PBXBuildFile section */
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
/* Begin PBXContainerItemProxy section */
...
@@ -716,6 +717,8 @@
...
@@ -716,6 +717,8 @@
C1FE504D1AE024FA00C18080
/* UIAlertView+Blocks.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"UIAlertView+Blocks.m"
;
sourceTree
=
"<group>"
;
};
C1FE504D1AE024FA00C18080
/* UIAlertView+Blocks.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"UIAlertView+Blocks.m"
;
sourceTree
=
"<group>"
;
};
C1FE50541AE3587F00C18080
/* ICRAttachmentUnit.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ICRAttachmentUnit.h
;
sourceTree
=
"<group>"
;
};
C1FE50541AE3587F00C18080
/* ICRAttachmentUnit.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ICRAttachmentUnit.h
;
sourceTree
=
"<group>"
;
};
C1FE50551AE3587F00C18080
/* ICRAttachmentUnit.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ICRAttachmentUnit.m
;
sourceTree
=
"<group>"
;
};
C1FE50551AE3587F00C18080
/* ICRAttachmentUnit.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ICRAttachmentUnit.m
;
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>"
;
};
/* End PBXFileReference section */
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
/* Begin PBXFrameworksBuildPhase section */
...
@@ -772,6 +775,8 @@
...
@@ -772,6 +775,8 @@
7217E9C51B72364300FE5C1D
/* NewSurveyViewController.m */
,
7217E9C51B72364300FE5C1D
/* NewSurveyViewController.m */
,
7217E9C61B72364300FE5C1D
/* SurveyViewController.h */
,
7217E9C61B72364300FE5C1D
/* SurveyViewController.h */
,
7217E9C71B72364300FE5C1D
/* SurveyViewController.m */
,
7217E9C71B72364300FE5C1D
/* SurveyViewController.m */
,
FE4F17231B72FAAB00924DED
/* ChosePersonViewController.h */
,
FE4F17241B72FAAB00924DED
/* ChosePersonViewController.m */
,
);
);
path
=
controllers
;
path
=
controllers
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -792,9 +797,9 @@
...
@@ -792,9 +797,9 @@
7217E9CF1B72364300FE5C1D
/* Views */
=
{
7217E9CF1B72364300FE5C1D
/* Views */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
7217E9D21B72364300FE5C1D
/* GrowingTextView */
,
7217E9D01B72364300FE5C1D
/* BoltMaskView.h */
,
7217E9D01B72364300FE5C1D
/* BoltMaskView.h */
,
7217E9D11B72364300FE5C1D
/* BoltMaskView.m */
,
7217E9D11B72364300FE5C1D
/* BoltMaskView.m */
,
7217E9D21B72364300FE5C1D
/* GrowingTextView */
,
7217E9D81B72364300FE5C1D
/* MaskCell.h */
,
7217E9D81B72364300FE5C1D
/* MaskCell.h */
,
7217E9D91B72364300FE5C1D
/* MaskCell.m */
,
7217E9D91B72364300FE5C1D
/* MaskCell.m */
,
7217E9DA1B72364300FE5C1D
/* maskEnable.png */
,
7217E9DA1B72364300FE5C1D
/* maskEnable.png */
,
...
@@ -1820,6 +1825,7 @@
...
@@ -1820,6 +1825,7 @@
C11A34621B24485100079129
/* ICRStoreResult.m in Sources */
,
C11A34621B24485100079129
/* ICRStoreResult.m in Sources */
,
7217E9E91B72364300FE5C1D
/* SurveyResult.m in Sources */
,
7217E9E91B72364300FE5C1D
/* SurveyResult.m in Sources */
,
C10214DB1AD90A3F0024637E
/* ICRFunctionBaseView.m in Sources */
,
C10214DB1AD90A3F0024637E
/* ICRFunctionBaseView.m in Sources */
,
FE4F17251B72FAAB00924DED
/* ChosePersonViewController.m in Sources */
,
30D7495F1ACE8F4400C63BA1
/* ICRConfigurationViewController.m in Sources */
,
30D7495F1ACE8F4400C63BA1
/* ICRConfigurationViewController.m in Sources */
,
C15918631AC19FB30013B391
/* ICRHomeViewController.m in Sources */
,
C15918631AC19FB30013B391
/* ICRHomeViewController.m in Sources */
,
C182E40E1AD4CE0B009BB9DB
/* IBTModel.m in Sources */
,
C182E40E1AD4CE0B009BB9DB
/* IBTModel.m in Sources */
,
...
@@ -2251,7 +2257,7 @@
...
@@ -2251,7 +2257,7 @@
"$(PROJECT_DIR)"
,
"$(PROJECT_DIR)"
,
);
);
PRODUCT_NAME
=
XFFruit
;
PRODUCT_NAME
=
XFFruit
;
PROVISIONING_PROFILE
=
"
cfc700e3-f78e-4893-a7fd-62daba6a0c6c
"
;
PROVISIONING_PROFILE
=
"
251ce065-a08f-44fd-bd52-f79372f4e47e
"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
};
};
name
=
Debug
;
name
=
Debug
;
...
@@ -2272,7 +2278,7 @@
...
@@ -2272,7 +2278,7 @@
"$(PROJECT_DIR)"
,
"$(PROJECT_DIR)"
,
);
);
PRODUCT_NAME
=
XFFruit
;
PRODUCT_NAME
=
XFFruit
;
PROVISIONING_PROFILE
=
"
cfc700e3-f78e-4893-a7fd-62daba6a0c6c
"
;
PROVISIONING_PROFILE
=
"
251ce065-a08f-44fd-bd52-f79372f4e47e
"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
};
};
name
=
Release
;
name
=
Release
;
...
@@ -2295,7 +2301,7 @@
...
@@ -2295,7 +2301,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
=
"
cfc700e3-f78e-4893-a7fd-62daba6a0c6c
"
;
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}/**"
;
};
};
...
@@ -2315,7 +2321,7 @@
...
@@ -2315,7 +2321,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
=
"
cfc700e3-f78e-4893-a7fd-62daba6a0c6c
"
;
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}/**"
;
};
};
...
...
XFFruit/Images.xcassets/Survey/delete.imageset/Contents.json
0 → 100644
View file @
b7edc038
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
,
"filename"
:
"delete@2x.png"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
XFFruit/Images.xcassets/Survey/delete.imageset/delete@2x.png
0 → 100644
View file @
b7edc038
3.16 KB
XFFruit/Images.xcassets/Survey/search.imageset/Contents.json
0 → 100644
View file @
b7edc038
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
,
"filename"
:
"search@2x.png"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
XFFruit/Images.xcassets/Survey/search.imageset/search@2x.png
0 → 100644
View file @
b7edc038
3.38 KB
XFFruit/Images.xcassets/Survey/textFiled.imageset/Contents.json
0 → 100644
View file @
b7edc038
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
,
"filename"
:
"textFiled.png"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
,
"filename"
:
"textFiled@2x.png"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
XFFruit/Images.xcassets/Survey/textFiled.imageset/textFiled.png
0 → 100644
View file @
b7edc038
3.09 KB
XFFruit/Images.xcassets/Survey/textFiled.imageset/textFiled@2x.png
0 → 100644
View file @
b7edc038
3.54 KB
XFFruit/ViewControllers/Survey/Views/BoltMaskView.m
View file @
b7edc038
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
static
NSString
*
cellID
=
@"MaskID"
;
static
NSString
*
cellID
=
@"MaskID"
;
MaskCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
];
MaskCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
];
if
(
cell
==
nil
)
{
if
(
cell
==
nil
)
{
cell
=
[[
MaskCell
alloc
]
initWithStyle
:
UITableViewCellStyleDefault
reuseIdentifier
:
cellID
totalWidth
:
ScreenSize
.
width
-
80
];
cell
=
[[
MaskCell
alloc
]
initWithStyle
:
UITableViewCellStyleDefault
reuseIdentifier
:
cellID
totalWidth
:
ScreenSize
.
width
-
80
totalHeight
:
TableHeight
];
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
}
}
...
...
XFFruit/ViewControllers/Survey/Views/MaskCell.h
View file @
b7edc038
...
@@ -13,8 +13,9 @@
...
@@ -13,8 +13,9 @@
@property
(
nonatomic
,
strong
)
UILabel
*
lineLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
lineLabel
;
@property
(
nonatomic
,
strong
)
UIButton
*
Commitbtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
Commitbtn
;
@property
(
nonatomic
,
assign
)
CGFloat
totalWidth
;
@property
(
nonatomic
,
assign
)
CGFloat
totalWidth
;
@property
(
nonatomic
,
assign
)
CGFloat
totalHeight
;
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
totalWidth
:(
CGFloat
)
totalWidth
;
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
totalWidth
:(
CGFloat
)
totalWidth
totalHeight
:(
CGFloat
)
totalHeight
;
-
(
void
)
setTitleStr
:(
NSString
*
)
str
;
-
(
void
)
setTitleStr
:(
NSString
*
)
str
;
...
...
XFFruit/ViewControllers/Survey/Views/MaskCell.m
View file @
b7edc038
...
@@ -14,11 +14,12 @@
...
@@ -14,11 +14,12 @@
@implementation
MaskCell
@implementation
MaskCell
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
totalWidth
:(
CGFloat
)
totalWidth
{
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
totalWidth
:(
CGFloat
)
totalWidth
totalHeight
:(
CGFloat
)
totalHeight
{
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
];
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
];
if
(
self
)
{
if
(
self
)
{
self
.
totalWidth
=
totalWidth
;
self
.
totalWidth
=
totalWidth
;
self
.
totalHeight
=
totalHeight
;
[
self
bulidLayout
];
[
self
bulidLayout
];
}
}
return
self
;
return
self
;
...
@@ -26,14 +27,14 @@
...
@@ -26,14 +27,14 @@
-
(
void
)
bulidLayout
-
(
void
)
bulidLayout
{
{
self
.
titleLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
LeftMargin
,
0
,
100
,
Table
Height
))];
self
.
titleLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
LeftMargin
,
0
,
100
,
self
.
total
Height
))];
self
.
titleLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
titleLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
titleLabel
.
textColor
=
HexColor
(
@"666666"
);
self
.
titleLabel
.
textColor
=
HexColor
(
@"666666"
);
self
.
titleLabel
.
font
=
FontSize
(
TitleSize
);
self
.
titleLabel
.
font
=
FontSize
(
TitleSize
);
self
.
Commitbtn
=
[
IBTCustomButtom
creatButtonWithFrame
:
CGRectMake
(
self
.
totalWidth
-
LeftMargin
-
BtnSize
,
10
,
BtnSize
,
BtnSize
)
target
:
nil
sel
:
nil
tag
:
0
image
:
@"selected"
title
:
nil
titleColor
:
nil
isCorner
:
NO
corner
:
0
bgColor
:
nil
];
self
.
Commitbtn
=
[
IBTCustomButtom
creatButtonWithFrame
:
CGRectMake
(
self
.
totalWidth
-
LeftMargin
-
BtnSize
,
10
,
BtnSize
,
BtnSize
)
target
:
nil
sel
:
nil
tag
:
0
image
:
@"selected"
title
:
nil
titleColor
:
nil
isCorner
:
NO
corner
:
0
bgColor
:
nil
];
self
.
lineLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
LeftMargin
,
Table
Height
-
1
,
self
.
totalWidth
-
LeftMargin
*
2
,
1
))];
self
.
lineLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
LeftMargin
,
self
.
total
Height
-
1
,
self
.
totalWidth
-
LeftMargin
*
2
,
1
))];
self
.
lineLabel
.
backgroundColor
=
HexColor
(
@"e5e5e5"
);
self
.
lineLabel
.
backgroundColor
=
HexColor
(
@"e5e5e5"
);
self
.
lineLabel
.
font
=
FontSize
(
TitleSize
);
self
.
lineLabel
.
font
=
FontSize
(
TitleSize
);
[
self
.
contentView
addSubview
:
self
.
titleLabel
];
[
self
.
contentView
addSubview
:
self
.
titleLabel
];
...
...
XFFruit/ViewControllers/Survey/Views/SortMaskView.m
View file @
b7edc038
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
self
=
[
super
initWithFrame
:
frame
];
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
if
(
self
)
{
self
.
tableView
=
[[
UITableView
alloc
]
initWithFrame
:
self
.
bounds
style
:(
UITableViewStylePlain
)];
self
.
tableView
=
[[
UITableView
alloc
]
initWithFrame
:
self
.
bounds
style
:(
UITableViewStylePlain
)];
self
.
tableView
.
backgroundColor
=
[
UIColor
white
Color
];
self
.
tableView
.
backgroundColor
=
[
UIColor
red
Color
];
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
self
.
tableView
.
dataSource
=
self
;
[
self
addSubview
:
self
.
tableView
];
[
self
addSubview
:
self
.
tableView
];
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
static
NSString
*
cellID
=
@"MaskID"
;
static
NSString
*
cellID
=
@"MaskID"
;
MaskCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
];
MaskCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
];
if
(
cell
==
nil
)
{
if
(
cell
==
nil
)
{
cell
=
[[
MaskCell
alloc
]
initWithStyle
:
UITableViewCellStyleDefault
reuseIdentifier
:
cellID
totalWidth
:
ScreenSize
.
width
];
cell
=
[[
MaskCell
alloc
]
initWithStyle
:
UITableViewCellStyleDefault
reuseIdentifier
:
cellID
totalWidth
:
ScreenSize
.
width
totalHeight
:
TableHeight
];
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
}
}
...
...
XFFruit/ViewControllers/Survey/controllers/ChosePersonViewController.h
0 → 100644
View file @
b7edc038
//
// ChosePersonViewController.h
// XFFruit
//
// Created by 陈俊俊 on 15/8/6.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ICRBaseViewController.h"
typedef
void
(
^
ChosePerson
)(
NSString
*
name
);
@interface
ChosePersonViewController
:
ICRBaseViewController
@property
(
nonatomic
,
assign
)
BOOL
isMoreChose
;
//是否是多选
@property
(
nonatomic
,
copy
)
ChosePerson
chosePerson
;
@end
XFFruit/ViewControllers/Survey/controllers/ChosePersonViewController.m
0 → 100644
View file @
b7edc038
//
// ChosePersonViewController.m
// XFFruit
//
// Created by 陈俊俊 on 15/8/6.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ChosePersonViewController.h"
#import "MaskCell.h"
#define TopMargin 50
#define TableHeight 50
@interface
ChosePersonViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
UITextFieldDelegate
>
{
UITableView
*
_tableView
;
UITextField
*
_selectTextFiled
;
NSMutableArray
*
_dataArr
;
NSMutableArray
*
_indexArr
;
}
@end
@implementation
ChosePersonViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[
self
initData
];
[
self
bulidLayout
];
}
-
(
void
)
initData
{
_dataArr
=
[
NSMutableArray
array
];
_indexArr
=
[
NSMutableArray
array
];
[
_dataArr
addObject
:
@"张三1"
];
[
_dataArr
addObject
:
@"小李2"
];
[
_dataArr
addObject
:
@"小思3"
];
[
_dataArr
addObject
:
@"王五4"
];
[
_dataArr
addObject
:
@"李四5"
];
[
_dataArr
addObject
:
@"张三6"
];
[
_dataArr
addObject
:
@"小李7"
];
[
_dataArr
addObject
:
@"小思8"
];
[
_dataArr
addObject
:
@"王五9"
];
[
_dataArr
addObject
:
@"李四10"
];
[
_dataArr
addObject
:
@"张三11"
];
[
_dataArr
addObject
:
@"小李12"
];
[
_dataArr
addObject
:
@"小思13"
];
[
_dataArr
addObject
:
@"王五14"
];
[
_dataArr
addObject
:
@"李四15"
];
}
-
(
void
)
bulidLayout
{
self
.
view
.
backgroundColor
=
HexColor
(
@"f8f8f8"
);
_selectTextFiled
=
[[
UITextField
alloc
]
initWithFrame
:
CGRectMake
(
20
,
5
,
ScreenSize
.
width
-
40
,
TopMargin
-
10
)];
_selectTextFiled
.
textAlignment
=
NSTextAlignmentLeft
;
_selectTextFiled
.
background
=
[
UIImage
imageNamed
:
@"textFiled"
];
_selectTextFiled
.
delegate
=
self
;
_selectTextFiled
.
font
=
FontSize
(
15
);
[
self
.
view
addSubview
:
_selectTextFiled
];
UIImageView
*
leftView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
35
,
40
)];
leftView
.
image
=
[
UIImage
imageNamed
:
@"search"
];
_selectTextFiled
.
leftView
=
leftView
;
_selectTextFiled
.
leftViewMode
=
UITextFieldViewModeAlways
;
UIButton
*
rightView
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
[
rightView
setImage
:[
UIImage
imageNamed
:
@"delete"
]
forState
:
UIControlStateNormal
];
rightView
.
frame
=
CGRectMake
(
0
,
0
,
35
,
40
);
[
rightView
addTarget
:
self
action
:
@selector
(
deletePerson
)
forControlEvents
:
UIControlEventTouchUpInside
];
_selectTextFiled
.
rightView
=
rightView
;
_selectTextFiled
.
rightViewMode
=
UITextFieldViewModeAlways
;
_tableView
=
[[
UITableView
alloc
]
initWithFrame
:(
CGRectMake
(
0
,
TopMargin
,
ScreenSize
.
width
,
ScreenSize
.
height
-
64
-
TopMargin
))
style
:(
UITableViewStylePlain
)];
_tableView
.
backgroundColor
=
[
UIColor
whiteColor
];
_tableView
.
delegate
=
self
;
_tableView
.
dataSource
=
self
;
[
self
.
view
addSubview
:
_tableView
];
UIBarButtonItem
*
rightItem
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"确定"
style
:
UIBarButtonItemStylePlain
target
:
self
action
:
@selector
(
sureClick
)];
self
.
navigationItem
.
rightBarButtonItem
=
rightItem
;
}
-
(
void
)
sureClick
{
self
.
chosePerson
(
_selectTextFiled
.
text
);
[
self
PopViewControllerAnimated
:
YES
];
}
-
(
void
)
deletePerson
{
_selectTextFiled
.
text
=
@""
;
[
_indexArr
removeAllObjects
];
[
_tableView
reloadData
];
}
#pragma mark - 协议方法
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
return
1
;
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
_dataArr
.
count
;
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
static
NSString
*
cellID
=
@"MaskCell"
;
MaskCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
];
if
(
cell
==
nil
)
{
cell
=
[[
MaskCell
alloc
]
initWithStyle
:
UITableViewCellStyleDefault
reuseIdentifier
:
cellID
totalWidth
:
ScreenSize
.
width
totalHeight
:
TableHeight
];
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
Commitbtn
.
hidden
=
YES
;
}
if
([
self
isHaveIndexPath
:
indexPath
])
{
cell
.
Commitbtn
.
hidden
=
NO
;
}
else
{
cell
.
Commitbtn
.
hidden
=
YES
;
}
[
cell
setTitleStr
:
_dataArr
[
indexPath
.
row
]];
return
cell
;
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
self
.
isMoreChose
==
YES
)
{
MaskCell
*
cell
=
(
MaskCell
*
)[
tableView
cellForRowAtIndexPath
:
indexPath
];
cell
.
Commitbtn
.
hidden
=
NO
;
if
(
!
[
self
isHaveIndexPath
:
indexPath
])
{
[
_indexArr
addObject
:
indexPath
];
}
NSString
*
personStr
=
@""
;
for
(
NSIndexPath
*
index
in
_indexArr
)
{
personStr
=
[
personStr
stringByAppendingFormat
:
@"%@、"
,
_dataArr
[
index
.
row
]];
}
_selectTextFiled
.
text
=
personStr
;
}
}
-
(
BOOL
)
isHaveIndexPath
:
(
NSIndexPath
*
)
indexPath
{
for
(
NSIndexPath
*
path
in
_indexArr
)
{
if
(
path
.
row
==
indexPath
.
row
)
{
return
YES
;
}
}
return
NO
;
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
return
TableHeight
;
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
}
@end
XFFruit/ViewControllers/Survey/controllers/NewSurveyViewController.m
View file @
b7edc038
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#import "SurveyCell.h"
#import "SurveyCell.h"
#import "HPGrowingTextView.h"
#import "HPGrowingTextView.h"
#import "StartTimeView.h"
#import "StartTimeView.h"
#import "ChosePersonViewController.h"
#define LeftMargin 15
#define LeftMargin 15
#define BtnHeight 44
#define BtnHeight 44
#define TableHeight 46
#define TableHeight 46
...
@@ -190,6 +191,14 @@ typedef enum : NSUInteger {
...
@@ -190,6 +191,14 @@ typedef enum : NSUInteger {
_isClickStart
=
NO
;
_isClickStart
=
NO
;
}
}
[
self
startDatePickView
];
[
self
startDatePickView
];
}
else
if
(
indexPath
.
row
==
4
){
ChosePersonViewController
*
cvc
=
[
ChosePersonViewController
new
];
cvc
.
chosePerson
=
^
(
NSString
*
name
){
_personLabel
.
text
=
name
;
_personLabel
.
textColor
=
HexColor
(
@"444444"
);
};
cvc
.
isMoreChose
=
YES
;
[
self
PushViewController
:
cvc
animated
:
YES
];
}
}
}
}
...
...
XFFruit/ViewControllers/Survey/controllers/SurveyViewController.m
View file @
b7edc038
...
@@ -134,7 +134,6 @@ typedef enum : NSUInteger {
...
@@ -134,7 +134,6 @@ typedef enum : NSUInteger {
currentBtn
=
btn
;
currentBtn
=
btn
;
}
}
}
else
if
(
btn
.
tag
==
BoltTag
){
}
else
if
(
btn
.
tag
==
BoltTag
){
if
(
_sortView
)
{
if
(
_sortView
)
{
[
self
hiddenSortMaskView
:
NO
];
[
self
hiddenSortMaskView
:
NO
];
}
}
...
@@ -166,6 +165,7 @@ typedef enum : NSUInteger {
...
@@ -166,6 +165,7 @@ typedef enum : NSUInteger {
}
}
-
(
void
)
hiddenSortMaskView
:
(
BOOL
)
isHide
{
-
(
void
)
hiddenSortMaskView
:
(
BOOL
)
isHide
{
[
_sortBtn
setImage
:[
UIImage
imageNamed
:
@"black_arrow_down_with_text"
]
forState
:
UIControlStateNormal
];
if
(
isHide
==
NO
)
{
if
(
isHide
==
NO
)
{
[
_sortView
removeFromSuperview
];
[
_sortView
removeFromSuperview
];
_sortView
=
nil
;
_sortView
=
nil
;
...
@@ -182,6 +182,7 @@ typedef enum : NSUInteger {
...
@@ -182,6 +182,7 @@ typedef enum : NSUInteger {
}
}
}
}
-
(
void
)
hiddenBoltMaskView
:
(
BOOL
)
isHide
{
-
(
void
)
hiddenBoltMaskView
:
(
BOOL
)
isHide
{
[
_boltBtn
setImage
:[
UIImage
imageNamed
:
@"black_filter_with_text"
]
forState
:
UIControlStateNormal
];
if
(
isHide
==
NO
)
{
if
(
isHide
==
NO
)
{
[
_boltView
removeFromSuperview
];
[
_boltView
removeFromSuperview
];
_boltView
=
nil
;
_boltView
=
nil
;
...
...
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