Commit 7281af31 authored by 陈俊俊's avatar 陈俊俊

行情调研

parent d4286c2c
platform :ios, 8.1 platform :ios, 8.1
pod 'AFNetworking', '~> 2.5.4' pod 'AFNetworking', '~> 2.5.4'
pod 'SDWebImage', '~> 3.7.3' pod 'SDWebImage', '~> 3.7.2’
pod 'MBProgressHUD', '~> 0.9.1' pod 'MBProgressHUD', '~> 0.9.1'
pod 'SSKeychain', '~> 1.2.3' pod 'SSKeychain', '~> 1.2.3'
pod 'FMDB', '~> 2.5 pod 'FMDB', '~> 2.5
pod 'BaiduMapAPI', '~> 2.8.0
pod 'Base64nl', '~> 1.2' pod 'Base64nl', '~> 1.2'
pod 'Reveal-iOS-SDK', '~> 1.5.1' pod 'Reveal-iOS-SDK', '~> 1.5.1'
pod 'BaiduMapAPI', '~> 2.8.0
...@@ -36,9 +36,9 @@ PODS: ...@@ -36,9 +36,9 @@ PODS:
- FMDB/common - FMDB/common
- MBProgressHUD (0.9.1) - MBProgressHUD (0.9.1)
- Reveal-iOS-SDK (1.5.1) - Reveal-iOS-SDK (1.5.1)
- SDWebImage (3.7.3): - SDWebImage (3.7.2):
- SDWebImage/Core (= 3.7.3) - SDWebImage/Core (= 3.7.2)
- SDWebImage/Core (3.7.3) - SDWebImage/Core (3.7.2)
- SSKeychain (1.2.3) - SSKeychain (1.2.3)
DEPENDENCIES: DEPENDENCIES:
...@@ -48,7 +48,7 @@ DEPENDENCIES: ...@@ -48,7 +48,7 @@ DEPENDENCIES:
- FMDB (~> 2.5) - FMDB (~> 2.5)
- MBProgressHUD (~> 0.9.1) - MBProgressHUD (~> 0.9.1)
- Reveal-iOS-SDK (~> 1.5.1) - Reveal-iOS-SDK (~> 1.5.1)
- SDWebImage (~> 3.7.3) - SDWebImage (~> 3.7.2)
- SSKeychain (~> 1.2.3) - SSKeychain (~> 1.2.3)
SPEC CHECKSUMS: SPEC CHECKSUMS:
...@@ -58,7 +58,7 @@ SPEC CHECKSUMS: ...@@ -58,7 +58,7 @@ SPEC CHECKSUMS:
FMDB: 96e8f1bcc1329e269330f99770ad4285d9003e52 FMDB: 96e8f1bcc1329e269330f99770ad4285d9003e52
MBProgressHUD: c47f2c166c126cf2ce36498d80f33e754d4e93ad MBProgressHUD: c47f2c166c126cf2ce36498d80f33e754d4e93ad
Reveal-iOS-SDK: c9c55cad2729c85f6ced415f1b21857c9a2d8ef9 Reveal-iOS-SDK: c9c55cad2729c85f6ced415f1b21857c9a2d8ef9
SDWebImage: 1d2b1a1efda1ade1b00b6f8498865f8ddedc8a84 SDWebImage: 71b7cdc1d1721d6a82ed62889030225f2c249e29
SSKeychain: 3f42991739c6c60a9cf1bbd4dff6c0d3694bcf3d SSKeychain: 3f42991739c6c60a9cf1bbd4dff6c0d3694bcf3d
COCOAPODS: 0.38.2 COCOAPODS: 0.38.2
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<Workspace <Workspace
version = "1.0"> version = "1.0">
<FileRef <FileRef
location = "group:/Users/mac/Desktop/folder/XFFruit.xcodeproj"> location = "group:XFFruit.xcodeproj">
</FileRef> </FileRef>
<FileRef <FileRef
location = "group:Pods/Pods.xcodeproj"> location = "group:Pods/Pods.xcodeproj">
......
...@@ -21,4 +21,7 @@ ...@@ -21,4 +21,7 @@
*/ */
+ (UIColor *)colorFromHex:(int32_t)rgbValue; + (UIColor *)colorFromHex:(int32_t)rgbValue;
+ (UIColor *)colorWithHexString: (NSString *)color;
@end @end
...@@ -24,4 +24,49 @@ ...@@ -24,4 +24,49 @@
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]; blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0];
} }
#pragma mark - 颜色转换
+ (UIColor *)colorWithHexString: (NSString *)color
{
NSString *cString = [[color stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] uppercaseString];
// String should be 6 or 8 characters
if ([cString length] < 6) {
return [UIColor clearColor];
}
// strip 0X if it appears
if ([cString hasPrefix:@"0X"])
cString = [cString substringFromIndex:2];
if ([cString hasPrefix:@"#"])
cString = [cString substringFromIndex:1];
if ([cString length] != 6)
return [UIColor clearColor];
// Separate into r, g, b substrings
NSRange range;
range.location = 0;
range.length = 2;
//r
NSString *rString = [cString substringWithRange:range];
//g
range.location = 2;
NSString *gString = [cString substringWithRange:range];
//b
range.location = 4;
NSString *bString = [cString substringWithRange:range];
// Scan values
unsigned int r, g, b;
[[NSScanner scannerWithString:rString] scanHexInt:&r];
[[NSScanner scannerWithString:gString] scanHexInt:&g];
[[NSScanner scannerWithString:bString] scanHexInt:&b];
//NSLog(@"%d,%d,%d",r,g,b);
return [UIColor colorWithRed:((float) r / 255.0f) green:((float) g / 255.0f) blue:((float) b / 255.0f) alpha:1.0f];
}
@end @end
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
} }
+ (void)customNavigationbarAppearance { + (void)customNavigationbarAppearance {
[UINavigationBar appearance].barTintColor = ICR_TINTCOLOR; [UINavigationBar appearance].barTintColor = HexColor(@"7ebf74");
[UINavigationBar appearance].tintColor = ICR_NAVIBAR_ITEM_COLOR; [UINavigationBar appearance].tintColor = ICR_NAVIBAR_ITEM_COLOR;
//Universal //Universal
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "black_arrow_down_with_text.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "black_arrow_down_with_text@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "black_filter_with_text.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "black_filter_with_text@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "select_arrow_up.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "select_arrow_up@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "selected-filter_with_text.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "selected-filter_with_text@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "selected.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "selected@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
...@@ -32,4 +32,8 @@ ...@@ -32,4 +32,8 @@
+ (IBTFileData *)saveImageToLocal:(UIImage *)imageToSave; + (IBTFileData *)saveImageToLocal:(UIImage *)imageToSave;
+ (NSDate *)convertToDateFrom:(NSString *)dateString;
+ (NSString *)stringFromDate:(NSDate*)aDate;
@end @end
...@@ -170,4 +170,19 @@ ...@@ -170,4 +170,19 @@
} }
} }
+ (NSDate *)convertToDateFrom:(NSString *)dateString{
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"yyyy.MM.dd"];
return [formatter dateFromString:dateString];
}
+ (NSString *)stringFromDate:(NSDate*)aDate{
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"yyyy.MM.dd"];
NSString *dateString = [formatter stringFromDate:aDate];
return dateString;
}
@end @end
...@@ -83,4 +83,15 @@ ...@@ -83,4 +83,15 @@
* Custom * Custom
*/ */
#define IBT_BIN_HIGHLIGHT_ALPHA (.6f) #define IBT_BIN_HIGHLIGHT_ALPHA (.6f)
#define XXFBgColor RGBA(246,246,246,1)
#define HexColor(colorStr) [UIColor colorWithHexString:colorStr]
#define RGBA(R,G,B,A) [UIColor colorWithRed:R/255.0f green:G/255.0f blue:B/255.0f alpha:A]
#define ScreenSize ([[UIScreen mainScreen] bounds].size)
#define IOS7 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)
#define FontSize(num) [UIFont systemFontOfSize:num]
#endif #endif
...@@ -23,4 +23,6 @@ ...@@ -23,4 +23,6 @@
target:(id)target target:(id)target
action:(SEL)selector; action:(SEL)selector;
+ (UIButton *)creatButtonWithFrame:(CGRect)frame target:(id)target sel:(SEL)sel tag:(NSInteger)tag image:(NSString *)name title:(NSString *)title titleColor:(UIColor *)titleCorlor isCorner:(BOOL)isCornor corner:(CGFloat)corner bgColor:(UIColor *)bgcolor;
@end @end
...@@ -64,4 +64,33 @@ ...@@ -64,4 +64,33 @@
return button; return button;
} }
+ (UIButton *)creatButtonWithFrame:(CGRect)frame target:(id)target sel:(SEL)sel tag:(NSInteger)tag image:(NSString *)name title:(NSString *)title titleColor:(UIColor *)titleCorlor isCorner:(BOOL)isCornor corner:(CGFloat)corner bgColor:(UIColor *)bgcolor{
UIButton *button = nil;
button = [UIButton buttonWithType:UIButtonTypeCustom];
if (name) {//创建图片按钮
[button setImage:[UIImage imageNamed:name] forState:UIControlStateNormal];
if (title) {
//创建 图片 和 标题按钮
[button setTitle:title forState:UIControlStateNormal];
[button setTitleColor:titleCorlor forState:UIControlStateNormal];
}
}else if(title){//创建标题按钮
[button setBackgroundColor:bgcolor];
[button setTitle:title forState:UIControlStateNormal];
[button setTitleColor:titleCorlor forState:UIControlStateNormal];
}
button.frame = frame;
button.tag = tag;
if (isCornor) {
button.layer.cornerRadius = corner;
button.layer.masksToBounds = YES;
}
[button addTarget:target action:sel forControlEvents:UIControlEventTouchUpInside];
return button;
}
@end @end
...@@ -22,6 +22,10 @@ ...@@ -22,6 +22,10 @@
#import "ICRFunctionEntity.h" #import "ICRFunctionEntity.h"
#import "ICRFunctionBaseView.h" #import "ICRFunctionBaseView.h"
#import "NewSurveyViewController.h"
#import "SurveyViewController.h"
@interface ICRHomeViewController () @interface ICRHomeViewController ()
< <
ICRFunctionBaseViewDelegate, ICRFunctionBaseViewDelegate,
...@@ -41,7 +45,6 @@ ...@@ -41,7 +45,6 @@
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
[self setupSubviews]; [self setupSubviews];
} }
- (void)didReceiveMemoryWarning { - (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning]; [super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated. // Dispose of any resources that can be recreated.
...@@ -75,15 +78,18 @@ ...@@ -75,15 +78,18 @@
NSMutableArray *arrFunctionEntities = [NSMutableArray array]; NSMutableArray *arrFunctionEntities = [NSMutableArray array];
NSArray *functionImageNames = @[ @"AnnouncementIcon",@"TaskManageIcon",@"PatrolPlanIcon",@"MyStoreIcon" ]; NSArray *functionImageNames = @[ @"AnnouncementIcon",@"TaskManageIcon",@"PatrolPlanIcon",@"MyStoreIcon",@"MyStoreIcon",@"MyStoreIcon"];
NSArray *fuctionNames = @[ [IBTCommon localizableString:@"Announcement"], NSArray *fuctionNames = @[ [IBTCommon localizableString:@"Announcement"],
[IBTCommon localizableString:@"TaskManage"], [IBTCommon localizableString:@"TaskManage"],
[IBTCommon localizableString:@"PatrolPlan"], [IBTCommon localizableString:@"PatrolPlan"],
[IBTCommon localizableString:@"MyStore"] ]; [IBTCommon localizableString:@"MyStore"],
[IBTCommon localizableString:@"Survey"],[IBTCommon localizableString:@"AddSurvey"]];
NSArray *functionTags = @[ @(kFunctionAnnouncement), NSArray *functionTags = @[ @(kFunctionAnnouncement),
@(kFunctionTaskManagement), @(kFunctionTaskManagement),
@(kFunctionPatrolPlan), @(kFunctionPatrolPlan),
@(kFunctionMyShop) ]; @(kFunctionMyShop),
@(kFunctionNavigation),
@(kFunctionComeShopReg)];
int i = 0; int i = 0;
for (NSString *functionName in fuctionNames) { for (NSString *functionName in fuctionNames) {
...@@ -143,7 +149,20 @@ ...@@ -143,7 +149,20 @@
[self PushViewController:sVC animated:YES]; [self PushViewController:sVC animated:YES];
} }
break; break;
case kFunctionNavigation:
{
SurveyViewController *svc = [[SurveyViewController alloc] init];
svc.title = [IBTCommon localizableString:@"Survey"];
[self PushViewController:svc animated:YES];
}
break;
case kFunctionComeShopReg:
{
NewSurveyViewController *svc = [[NewSurveyViewController alloc] init];
svc.title = [IBTCommon localizableString:@"AddSurvey"];
[self PushViewController:svc animated:YES];
}
break;
default: default:
break; break;
} }
......
...@@ -112,31 +112,37 @@ ...@@ -112,31 +112,37 @@
} }
- (void)onLoginTapped:(__unused id)sender { - (void)onLoginTapped:(__unused id)sender {
//
// NSString *nsRegisterCode = self.m_containerView.m_cCodeTextF.text;
// NSString *nsUserName = self.m_containerView.m_userNameTextF.text;
// NSString *nsPassword = [self.m_containerView.m_passwordTextF.text uppercaseMD5String];
//
// void(^succ)(id) = ^(id data) {
// ICRUserUtil *userUtil = [ICRUserUtil sharedInstance];
// userUtil.bAutoLogin = @( [_m_containerView isAutoLogin] );
// [userUtil saveArchive];
//
// ICRAppViewControllerManager *mgr =
// [ICRAppViewControllerManager getAppViewControllerManager];
//
// [mgr openMainFrame];
// };
//
// void(^fail)(id) = ^(id data) {
// [IBTLoadingView showTips:data];
// };
// ICRHTTPController *httpCtrl = [ICRHTTPController sharedController];
// [httpCtrl doLoginWithUserName:nsUserName
// password:nsPassword
// registerCode:nsRegisterCode
// success:succ
// failure:fail];
ICRAppViewControllerManager *mgr =
[ICRAppViewControllerManager getAppViewControllerManager];
[mgr openMainFrame];
NSString *nsRegisterCode = self.m_containerView.m_cCodeTextF.text;
NSString *nsUserName = self.m_containerView.m_userNameTextF.text;
NSString *nsPassword = [self.m_containerView.m_passwordTextF.text uppercaseMD5String];
void(^succ)(id) = ^(id data) {
ICRUserUtil *userUtil = [ICRUserUtil sharedInstance];
userUtil.bAutoLogin = @( [_m_containerView isAutoLogin] );
[userUtil saveArchive];
ICRAppViewControllerManager *mgr =
[ICRAppViewControllerManager getAppViewControllerManager];
[mgr openMainFrame];
};
void(^fail)(id) = ^(id data) {
[IBTLoadingView showTips:data];
};
ICRHTTPController *httpCtrl = [ICRHTTPController sharedController];
[httpCtrl doLoginWithUserName:nsUserName
password:nsPassword
registerCode:nsRegisterCode
success:succ
failure:fail];
} }
#pragma mark - TextObserver #pragma mark - TextObserver
......
//
// BoltMaskView.h
// XFFurit
//
// Created by 陈俊俊 on 15/8/1.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol BoltMaskViewDelegate <NSObject>
- (void)getBoltValueSelectRow:(NSString *)state;
@end
@interface BoltMaskView : UIView<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)NSMutableArray *dataArr;
@property (nonatomic,weak)id <BoltMaskViewDelegate>delegate;
@end
//
// BoltMaskView.m
// XFFurit
//
// Created by 陈俊俊 on 15/8/1.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "BoltMaskView.h"
#import "MaskCell.h"
#define TableHeight 35
#define LeftMargin 80
#define TotalHeight 176
#define LeftHeight 44
@interface BoltMaskView ()
{
UIView *_leftView;
UIButton *_currentBtn;
MaskCell *_currentCell;
}
@end
@implementation BoltMaskView
- (instancetype)initWithFrame:(CGRect)frame{
self = [super initWithFrame:frame];
if (self) {
[self createView];
}
return self;
}
#pragma mark - 创建视图
- (void)createView
{
_leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, LeftMargin,self.frame.size.height)];
[self addSubview:_leftView];
NSArray *arr = @[@"按状态",@"条件一",@"条件二",@"条件三"];
for (NSInteger i = 0; i<arr.count; i++) {
UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
button.frame = CGRectMake(0, LeftHeight * i , LeftMargin ,LeftHeight);
[button setTitle:arr[i] forState:UIControlStateNormal];
[button setTitleColor:HexColor(@"888888") forState:UIControlStateNormal];
if (i == 0) {
button.enabled = NO;
_currentBtn = button;
}
[button setBackgroundImage:[UIImage imageNamed:@"maskEnable"] forState:UIControlStateDisabled];
[button setBackgroundImage:[UIImage imageNamed:@"mask"] forState:UIControlStateNormal];
button.tag = 1001+i;
[button addTarget:self action:@selector(leftBtnClick:) forControlEvents:UIControlEventTouchUpInside];
[_leftView addSubview:button];
}
self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(LeftMargin, 0, ScreenSize.width - LeftMargin, self.frame.size.height) style:(UITableViewStylePlain)];
self.tableView.backgroundColor = [UIColor whiteColor];
self.tableView.delegate = self;
self.tableView.dataSource = self;
[self addSubview:self.tableView];
}
- (void)leftBtnClick:(UIButton *)btn{
_currentBtn.enabled = YES;
btn.enabled = NO;
_currentBtn = btn;
}
#pragma mark - 协议
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.dataArr.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellID = @"MaskID";
MaskCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
if (cell == nil) {
cell = [[MaskCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID totalWidth: ScreenSize.width - 80];
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
if (_dataArr.count > 0) {
cell.Commitbtn.hidden = YES;
[cell setTitleStr:self.dataArr[indexPath.row]];
}
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
//获取选中的cell
_currentCell.Commitbtn.hidden = YES;
MaskCell *cell = (MaskCell *)[tableView cellForRowAtIndexPath:indexPath];
cell.Commitbtn.hidden = NO;
_currentCell = cell;
[self.delegate getBoltValueSelectRow:@"tt"];
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return TableHeight;
}
@end
//
// HPTextView.h
//
// Created by Hans Pinckaers on 29-06-10.
//
// MIT License
//
// Copyright (c) 2011 Hans Pinckaers
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <UIKit/UIKit.h>
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 60000
// UITextAlignment is deprecated in iOS 6.0+, use NSTextAlignment instead.
// Reference: https://developer.apple.com/library/ios/documentation/uikit/reference/NSString_UIKit_Additions/Reference/Reference.html
#define NSTextAlignment UITextAlignment
#endif
@class HPGrowingTextView;
@class HPTextViewInternal;
@protocol HPGrowingTextViewDelegate
@optional
- (BOOL)growingTextViewShouldBeginEditing:(HPGrowingTextView *)growingTextView;
- (BOOL)growingTextViewShouldEndEditing:(HPGrowingTextView *)growingTextView;
- (void)growingTextViewDidBeginEditing:(HPGrowingTextView *)growingTextView;
- (void)growingTextViewDidEndEditing:(HPGrowingTextView *)growingTextView;
- (BOOL)growingTextView:(HPGrowingTextView *)growingTextView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text;
- (void)growingTextViewDidChange:(HPGrowingTextView *)growingTextView;
- (void)growingTextView:(HPGrowingTextView *)growingTextView willChangeHeight:(float)height;
- (void)growingTextView:(HPGrowingTextView *)growingTextView didChangeHeight:(float)height;
- (void)growingTextViewDidChangeSelection:(HPGrowingTextView *)growingTextView;
- (BOOL)growingTextViewShouldReturn:(HPGrowingTextView *)growingTextView;
@end
@interface HPGrowingTextView : UIView <UITextViewDelegate> {
HPTextViewInternal *internalTextView;
int minHeight;
int maxHeight;
//class properties
int maxNumberOfLines;
int minNumberOfLines;
BOOL animateHeightChange;
NSTimeInterval animationDuration;
//uitextview properties
NSObject <HPGrowingTextViewDelegate> *__unsafe_unretained delegate;
NSTextAlignment textAlignment;
NSRange selectedRange;
BOOL editable;
UIDataDetectorTypes dataDetectorTypes;
UIReturnKeyType returnKeyType;
UIKeyboardType keyboardType;
UIEdgeInsets contentInset;
}
//real class properties
@property int maxNumberOfLines;
@property int minNumberOfLines;
@property (nonatomic) int maxHeight;
@property (nonatomic) int minHeight;
@property BOOL animateHeightChange;
@property NSTimeInterval animationDuration;
@property (nonatomic, strong) NSString *placeholder;
@property (nonatomic, strong) UIColor *placeholderColor;
@property (nonatomic, strong) UITextView *internalTextView;
//uitextview properties
@property(unsafe_unretained) NSObject<HPGrowingTextViewDelegate> *delegate;
@property(nonatomic,strong) NSString *text;
@property(nonatomic,strong) UIFont *font;
@property(nonatomic,strong) UIColor *textColor;
@property(nonatomic) NSTextAlignment textAlignment; // default is NSTextAlignmentLeft
@property(nonatomic) NSRange selectedRange; // only ranges of length 0 are supported
@property(nonatomic,getter=isEditable) BOOL editable;
@property(nonatomic) UIDataDetectorTypes dataDetectorTypes __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_3_0);
@property (nonatomic) UIReturnKeyType returnKeyType;
@property (nonatomic) UIKeyboardType keyboardType;
@property (assign) UIEdgeInsets contentInset;
@property (nonatomic) BOOL isScrollable;
@property(nonatomic) BOOL enablesReturnKeyAutomatically;
@property(nonatomic, copy) NSString*textViewText;
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000
- (id)initWithFrame:(CGRect)frame textContainer:(NSTextContainer *)textContainer;
#endif
//uitextview methods
//need others? use .internalTextView
- (BOOL)becomeFirstResponder;
- (BOOL)resignFirstResponder;
- (BOOL)isFirstResponder;
- (BOOL)hasText;
- (void)scrollRangeToVisible:(NSRange)range;
// call to force a height change (e.g. after you change max/min lines)
- (void)refreshHeight;
- (void)deleteBackward;
@end
//
// HPTextViewInternal.h
//
// Created by Hans Pinckaers on 29-06-10.
//
// MIT License
//
// Copyright (c) 2011 Hans Pinckaers
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <UIKit/UIKit.h>
@interface HPTextViewInternal : UITextView
@property (nonatomic, strong) NSString *placeholder;
@property (nonatomic, strong) UIColor *placeholderColor;
@property (nonatomic) BOOL displayPlaceHolder;
@end
//
// HPTextViewInternal.m
//
// Created by Hans Pinckaers on 29-06-10.
//
// MIT License
//
// Copyright (c) 2011 Hans Pinckaers
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "HPTextViewInternal.h"
@implementation HPTextViewInternal
-(void)setText:(NSString *)text
{
BOOL originalValue = self.scrollEnabled;
//If one of GrowingTextView's superviews is a scrollView, and self.scrollEnabled == NO,
//setting the text programatically will cause UIKit to search upwards until it finds a scrollView with scrollEnabled==yes
//then scroll it erratically. Setting scrollEnabled temporarily to YES prevents this.
[self setScrollEnabled:YES];
[super setText:text];
[self setScrollEnabled:originalValue];
}
- (void)setScrollable:(BOOL)isScrollable
{
[super setScrollEnabled:isScrollable];
}
-(void)setContentOffset:(CGPoint)s
{
if(self.tracking || self.decelerating){
//initiated by user...
UIEdgeInsets insets = self.contentInset;
insets.bottom = 0;
insets.top = 0;
self.contentInset = insets;
} else {
float bottomOffset = (self.contentSize.height - self.frame.size.height + self.contentInset.bottom);
if(s.y < bottomOffset && self.scrollEnabled){
UIEdgeInsets insets = self.contentInset;
insets.bottom = 8;
insets.top = 0;
self.contentInset = insets;
}
}
// Fix "overscrolling" bug
if (s.y > self.contentSize.height - self.frame.size.height && !self.decelerating && !self.tracking && !self.dragging)
s = CGPointMake(s.x, self.contentSize.height - self.frame.size.height);
[super setContentOffset:s];
}
-(void)setContentInset:(UIEdgeInsets)s
{
UIEdgeInsets insets = s;
if(s.bottom>8) insets.bottom = 0;
insets.top = 0;
[super setContentInset:insets];
}
-(void)setContentSize:(CGSize)contentSize
{
// is this an iOS5 bug? Need testing!
if(self.contentSize.height > contentSize.height)
{
UIEdgeInsets insets = self.contentInset;
insets.bottom = 0;
insets.top = 0;
self.contentInset = insets;
}
[super setContentSize:contentSize];
}
- (void)drawRect:(CGRect)rect
{
[super drawRect:rect];
if (self.displayPlaceHolder && self.placeholder && self.placeholderColor)
{
if ([self respondsToSelector:@selector(snapshotViewAfterScreenUpdates:)])
{
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
paragraphStyle.alignment = self.textAlignment;
[self.placeholder drawInRect:CGRectMake(5, 8 + self.contentInset.top, self.frame.size.width-self.contentInset.left-5, self.frame.size.height- self.contentInset.top) withAttributes:@{NSFontAttributeName:self.font, NSForegroundColorAttributeName:self.placeholderColor, NSParagraphStyleAttributeName:paragraphStyle}];
}
else {
[self.placeholderColor set];
[self.placeholder drawInRect:CGRectMake(8.0f, 8.0f, self.frame.size.width - 16.0f, self.frame.size.height - 16.0f) withFont:self.font];
}
}
}
-(void)setPlaceholder:(NSString *)placeholder
{
_placeholder = placeholder;
[self setNeedsDisplay];
}
@end
//
// MaskCell.h
// XFFurit
//
// Created by 陈俊俊 on 15/8/1.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MaskCell : UITableViewCell
@property (nonatomic,strong)UILabel *titleLabel;
@property (nonatomic,strong)UILabel *lineLabel;
@property (nonatomic,strong)UIButton *Commitbtn;
@property (nonatomic,assign)CGFloat totalWidth;
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier totalWidth:(CGFloat)totalWidth;
- (void)setTitleStr:(NSString *)str;
@end
//
// MaskCell.m
// XFFurit
//
// Created by 陈俊俊 on 15/8/1.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "MaskCell.h"
#define TitleSize 14
#define LeftMargin 20
#define TableHeight 35
#define BtnSize 14
@implementation MaskCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier totalWidth:(CGFloat)totalWidth{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
self.totalWidth = totalWidth;
[self bulidLayout];
}
return self;
}
- (void)bulidLayout
{
self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, 0, 100, TableHeight))];
self.titleLabel.textAlignment= NSTextAlignmentLeft;
self.titleLabel.textColor = HexColor(@"666666");
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.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin,TableHeight-1, self.totalWidth - LeftMargin * 2, 1))];
self.lineLabel.backgroundColor = HexColor(@"e5e5e5");
self.lineLabel.font = FontSize(TitleSize);
[self.contentView addSubview:self.titleLabel];
[self.contentView addSubview:self.lineLabel];
[self.contentView addSubview:self.Commitbtn];
}
- (void)setTitleStr:(NSString *)str
{
self.titleLabel.text = str;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
//
// SortMaskView.h
// XFFurit
//
// Created by 陈俊俊 on 15/8/1.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol SortMaskViewDelegate <NSObject>
- (void)getSortValueSelectRow:(NSString *)state;
@end
@interface SortMaskView : UIView<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)NSMutableArray *dataArr;
@property (nonatomic,weak)id <SortMaskViewDelegate>delegate;
@end
//
// SortMaskView.m
// XFFurit
//
// Created by 陈俊俊 on 15/8/1.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "SortMaskView.h"
#import "MaskCell.h"
#define TableHeight 35
@interface SortMaskView ()
{
MaskCell *_currentCell;
}
@end
@implementation SortMaskView
- (instancetype)initWithFrame:(CGRect)frame{
self = [super initWithFrame:frame];
if (self) {
self.tableView = [[UITableView alloc]initWithFrame:self.bounds style:(UITableViewStylePlain)];
self.tableView.backgroundColor = [UIColor whiteColor];
self.tableView.delegate = self;
self.tableView.dataSource = self;
[self addSubview:self.tableView];
}
return self;
}
#pragma mark - 协议
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.dataArr.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellID = @"MaskID";
MaskCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
if (cell == nil) {
cell = [[MaskCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID totalWidth:ScreenSize.width];
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
if (_dataArr.count > 0) {
[cell setTitleStr:self.dataArr[indexPath.row]];
cell.Commitbtn.hidden = YES;
}
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
//获取选中的cell
_currentCell.Commitbtn.hidden = YES;
MaskCell *cell = (MaskCell *)[tableView cellForRowAtIndexPath:indexPath];
cell.Commitbtn.hidden = NO;
_currentCell = cell;
[self.delegate getSortValueSelectRow:@"s"];
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return TableHeight;
}
@end
//
// StartTimeView.h
// XFFurit
//
// Created by陈俊俊 on 15/8/5.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol StartTimeViewDelegate <NSObject>
- (void)cancelTimeView;
- (void)okTimeView:(NSDate *)time;
@end
@interface StartTimeView : UIView
@property (nonatomic,weak)id<StartTimeViewDelegate>delegate;
@end
//
// StartTimeView.m
// XFFurit
//
// Created by陈俊俊 on 15/8/5.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "StartTimeView.h"
#define DateViewHeight 246
@interface StartTimeView ()
{
UIView *_bgView;
UIDatePicker *_timePicker;
}
@end
@implementation StartTimeView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self bulidLayout];
}
return self;
}
- (void)bulidLayout{
_bgView = [[UIView alloc] initWithFrame:CGRectMake(0, self.frame.size.height - DateViewHeight, ScreenSize.width, DateViewHeight)];
_bgView.backgroundColor = RGBA(239, 239, 239 ,1);
[self addSubview:_bgView];
UIButton *okBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(ScreenSize.width - 62, 0, 62, 28) target:self sel:@selector(okClick) tag:0 image:nil title:@"确定" titleColor:[UIColor blackColor] isCorner:NO corner:0 bgColor:RGBA(239, 239, 239 ,1)];
[_bgView addSubview:okBtn];
UIButton *cancelBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(0, 0, 62, 28) target:self sel:@selector(cancelClick) tag:0 image:nil title:@"取消" titleColor:[UIColor blackColor] isCorner:NO corner:0 bgColor:RGBA(239, 239, 239 ,1)];
[_bgView addSubview:cancelBtn];
_timePicker= [[UIDatePicker alloc] initWithFrame:CGRectMake(0, 30,ScreenSize.width, DateViewHeight - 30)];
_timePicker.backgroundColor = [UIColor whiteColor];
_timePicker.datePickerMode = UIDatePickerModeDate;
_timePicker.locale = [[NSLocale alloc]initWithLocaleIdentifier:@"zh_CN"];
// 设置最小时间段,防止用户的出现已过去的时间
_timePicker.minimumDate = [NSDate date];
[_bgView addSubview:_timePicker];
}
- (void)okClick{
[self.delegate okTimeView:_timePicker.date];
}
- (void)cancelClick{
[self.delegate cancelTimeView];
}
@end
//
// SurveyCell.h
// XFFurit
//
// Created by 陈俊俊 on 15/8/1.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SurveyCell : UITableViewCell
@property (nonatomic,strong)UILabel *titleLabel;
@property (nonatomic,strong)UILabel *lineLabel;
- (void)setTitleStr:(NSString *)str;
@end
//
// SurveyCell.m
// XFFurit
//
// Created by 陈俊俊 on 15/8/1.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "SurveyCell.h"
#define TitleSize 15
#define LeftMargin 15
@implementation SurveyCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
[self bulidLayout];
}
return self;
}
- (void)bulidLayout
{
self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, 0, 100, 44))];
self.titleLabel.textAlignment= NSTextAlignmentLeft;
self.titleLabel.textColor = HexColor(@"666666");
self.titleLabel.font = FontSize(TitleSize);
self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, 44-1, ScreenSize.width - LeftMargin * 2, 1))];
self.lineLabel.backgroundColor = HexColor(@"e5e5e5");
self.lineLabel.font = FontSize(TitleSize);
[self.contentView addSubview:self.titleLabel];
[self.contentView addSubview:self.lineLabel];
}
- (void)setTitleStr:(NSString *)str
{
self.titleLabel.text = str;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
//
// SurveyListCell.h
// XFFurit
//
// Created by 陈俊俊 on 15/8/1.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "Survey.h"
@interface SurveyListCell : UITableViewCell
@property (nonatomic,strong)UILabel *titleLabel;
@property (nonatomic,strong)UILabel *billnumberLabel;
@property (nonatomic,strong)UILabel *begindateLabel;
@property (nonatomic,strong)UILabel *productnameLabel;
@property (nonatomic,strong)UILabel *enddateLabel;
@property (nonatomic,strong)UILabel *lineLabel;
@property (nonatomic,strong)UIButton *stateBtn;
@property (nonatomic,strong)Survey *survey;
@end
//
// SurveyListCell.m
// XFFurit
//
// Created by 陈俊俊 on 15/8/1.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "SurveyListCell.h"
#define TitleSize 16
#define ContentSize 14
#define TitleColor @"444444"
#define ContentColor @"aaaaaa"
#define LeftMargin 80
#define TopMargin 10
#define TitleHeight 20
#define TableHeight 120
@implementation SurveyListCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
[self bulidLayout];
}
return self;
}
- (void)bulidLayout
{
self.stateBtn = [UIButton buttonWithType:UIButtonTypeCustom];
self.stateBtn.frame = CGRectMake(TopMargin *2 , TopMargin, LeftMargin - TopMargin*2, 20);
self.stateBtn.titleLabel.font = FontSize(ContentSize);
[self.stateBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
self.stateBtn.enabled = NO;
self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, TopMargin, ScreenSize.width - LeftMargin, TitleHeight))];
self.titleLabel.textColor = HexColor(TitleColor);
self.titleLabel.font = FontSize(TitleSize);
self.billnumberLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.titleLabel.frame), ScreenSize.width - LeftMargin, TitleHeight))];
self.billnumberLabel.textColor = HexColor(ContentColor);
self.billnumberLabel.font = FontSize(ContentSize);
self.productnameLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.billnumberLabel.frame), ScreenSize.width - LeftMargin, TitleHeight))];
self.productnameLabel.textColor = HexColor(ContentColor);
self.productnameLabel.font = FontSize(ContentSize);
self.begindateLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.productnameLabel.frame), ScreenSize.width - LeftMargin, TitleHeight))];
self.begindateLabel.textColor = HexColor(ContentColor);
self.begindateLabel.font = FontSize(ContentSize);
self.enddateLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.begindateLabel.frame), ScreenSize.width - LeftMargin, TitleHeight))];
self.enddateLabel.textColor = HexColor(ContentColor);
self.enddateLabel.font = FontSize(ContentSize);
self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin,TableHeight-1, ScreenSize.width - LeftMargin - TopMargin * 2, 1))];;
self.lineLabel.backgroundColor = HexColor(@"e5e5e5");
[self.contentView addSubview:self.stateBtn];
[self.contentView addSubview:self.titleLabel];
[self.contentView addSubview:self.billnumberLabel];
[self.contentView addSubview:self.productnameLabel];
[self.contentView addSubview:self.begindateLabel];
[self.contentView addSubview:self.enddateLabel];
[self.contentView addSubview:self.lineLabel];
}
- (void)setSurvey:(Survey *)survey{
self.titleLabel.text = survey.title;
self.billnumberLabel.text = survey.billnumber;
self.productnameLabel.text = survey.productname;
self.begindateLabel.text = [IBTCommon stringFromDate: survey.begindate];
self.enddateLabel.text = [IBTCommon stringFromDate:survey.enddate];
NSString *stateStr = @"";
if ([survey.state isEqualToString:@"saved"]) {
[self.stateBtn setBackgroundColor:[UIColor redColor]];
stateStr = @"未提交";
}else if ([survey.state isEqualToString:@"submitted"]) {
[self.stateBtn setBackgroundColor:[UIColor greenColor]];
stateStr = @"已提交";
}else if ([survey.state isEqualToString:@"insurvey"]) {
[self.stateBtn setBackgroundColor:[UIColor grayColor]];
stateStr = @"调研中";
}else if ([survey.state isEqualToString:@"finished"]) {
[self.stateBtn setBackgroundColor:[UIColor blackColor]];
stateStr = @"已完成";
}
[self.stateBtn setTitle:stateStr forState:UIControlStateNormal];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
}
@end
//
// NewSResultViewController.h
// XFFurit
//
// Created by 陈俊俊 on 15/8/5.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ICRBaseViewController.h"
@interface NewSResultViewController : ICRBaseViewController
@end
//
// NewSResultViewController.m
// XFFurit
//
// Created by 陈俊俊 on 15/8/5.
// Copyright (c) 2015年 Xummer. All rights reserved.
// 新建
#import "NewSResultViewController.h"
@interface NewSResultViewController ()
@end
@implementation NewSResultViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
//
// NewSurveyViewController.h
// XFFurit
//
// Created by 陈俊俊 on 15/8/1.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ICRBaseViewController.h"
@interface NewSurveyViewController : ICRBaseViewController
@end
//
// NewSurveyViewController.m
// XFFurit
//
// Created by 陈俊俊 on 15/8/1.
// Copyright (c) 2015年 Xummer. All rights reserved.
// 新建行情调研
#import "NewSurveyViewController.h"
#import "SurveyCell.h"
#import "HPGrowingTextView.h"
#import "StartTimeView.h"
#define LeftMargin 15
#define BtnHeight 44
#define TableHeight 46
#define CornerRadius 5
#define TitleSize 15
#define BtnSize 19
#define TotalHeight 432
#define KeyboardHeight 258
#define DateViewHeight 300
typedef enum : NSUInteger {
SaveTag = 2000,
CommitTag,
} BtnTag;
@interface NewSurveyViewController ()<UITableViewDataSource,UITableViewDelegate,HPGrowingTextViewDelegate,UITextFieldDelegate,StartTimeViewDelegate>
{
UITableView *_tableView;
NSMutableArray *_dataArr;
UITextField *_titleField;
UILabel *_productLabel;
UILabel *_startDateLabel;
UILabel *_endDateLabel;
UILabel *_personLabel;
HPGrowingTextView *_noteTextView;
UIDatePicker *_timePicker;
BOOL _isClickStart;
StartTimeView *_startTimeView;
}
@end
@implementation NewSurveyViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"新建行情调研单";
[self initData];
[self createTableView];
UIBarButtonItem *leftItem = [[UIBarButtonItem alloc]initWithTitle:@"新建行情反馈" style:UIBarButtonItemStylePlain target:self action:@selector(itemClick1)];
self.navigationItem.rightBarButtonItem = leftItem;
}
- (void)itemClick1{
}
- (void)initData{
_dataArr = [NSMutableArray array];
[_dataArr addObject:@"标题"];
[_dataArr addObject:@"商品"];
[_dataArr addObject:@"开始日期"];
[_dataArr addObject:@"结束日期"];
[_dataArr addObject:@"调研人员"];
[_dataArr addObject:@"备注"];
}
- (void)createTableView
{
_tableView = [[UITableView alloc]initWithFrame:(CGRectMake(0, LeftMargin,ScreenSize.width, ScreenSize.height - 64 - LeftMargin)) style:(UITableViewStylePlain)];
_tableView.backgroundColor = [UIColor whiteColor];
_tableView.bounces = NO;
_tableView.delegate = self;
_tableView.dataSource = self;
UIView *footView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 50)];
UIButton *saveBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, 10, (ScreenSize.width - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:SaveTag image:nil title:@"保存" titleColor: [UIColor whiteColor] isCorner:YES corner:CornerRadius bgColor:HexColor(@"50bd62")];
[footView addSubview:saveBtn];
UIButton *commitBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(saveBtn.frame.origin.x + saveBtn.frame.size.width + LeftMargin, 10, (ScreenSize.width - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:CommitTag image:nil title:@"提交" titleColor: [UIColor whiteColor] isCorner:YES corner:CornerRadius bgColor:HexColor(@"f69100")];
[footView addSubview:commitBtn];
[self.view addSubview:footView];
_tableView.tableFooterView = footView;
[self.view addSubview:_tableView];
}
#pragma mark - 按钮点击事件
- (void)btnClick:(UIButton *)btn{
switch (btn.tag) {
case SaveTag:
{
}
break;
case CommitTag:
{
}
break;
default:
break;
}
}
#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 = @"cellID";
SurveyCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
if (cell == nil) {
cell = [[SurveyCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
if (indexPath.row >0 && indexPath.row < _dataArr.count - 1) {
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
[self createViewInCell:cell indexPath:indexPath];
}
[cell setTitleStr:_dataArr[indexPath.row]];
return cell;
}
- (void)createViewInCell:(SurveyCell *)cell indexPath:(NSIndexPath *)indexPath{
if (indexPath.row == 0) {
_titleField = [[UITextField alloc] initWithFrame:CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-10, TableHeight)];
_titleField.textAlignment = NSTextAlignmentRight;
_titleField.textColor = HexColor(@"444444");
_titleField.placeholder = @"输入调研标题";
_titleField.font = FontSize(15);
_titleField.delegate = self;
[cell.contentView addSubview:_titleField];
}else if (indexPath.row == _dataArr.count -1){
_noteTextView = [[HPGrowingTextView alloc] initWithFrame:CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-10, TableHeight)];
_noteTextView.contentInset = UIEdgeInsetsMake(5, 5, 5, 0);
_noteTextView.minNumberOfLines = 1;
_noteTextView.maxNumberOfLines = 4;
_noteTextView.font = FontSize(15);
_noteTextView.textAlignment = NSTextAlignmentRight;
_noteTextView.delegate = self;
_noteTextView.placeholder = @"输入备注内容";
[cell.contentView addSubview:_noteTextView];
CGRect lineFrame = cell.lineLabel.frame;
lineFrame.origin.y = TableHeight*2-1;
cell.lineLabel.frame = lineFrame;
}else{
UILabel *contentLabel = [[UILabel alloc]initWithFrame:(CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-10, TableHeight))];
contentLabel.textAlignment= NSTextAlignmentRight;
contentLabel.textColor = HexColor(@"bbbbbb");
contentLabel.font = FontSize(TitleSize);
[cell.contentView addSubview:contentLabel];
if (indexPath.row == 1) {
contentLabel.text = @"选择商品";
_productLabel = contentLabel;
}else if(indexPath.row == 2){
contentLabel.text = @"选择日期";
_startDateLabel = contentLabel;
}else if(indexPath.row == 3){
contentLabel.text = @"选择日期";
_endDateLabel = contentLabel;
}else if(indexPath.row == 4){
contentLabel.text = @"选择调研人员";
_personLabel = contentLabel;
}
}
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.row == 5){
return TableHeight*2;
}else{
return TableHeight;
}
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.row == 2 || indexPath.row == 3) {
if (indexPath.row == 2) {
_isClickStart = YES;
}else{
_isClickStart = NO;
}
[self startDatePickView];
}
}
- (void)startDatePickView{
if (!_startTimeView) {
_startTimeView = [[StartTimeView alloc] initWithFrame:CGRectMake(0, ScreenSize.height, ScreenSize.width, ScreenSize.height - 64)];
_startTimeView.delegate = self;
_startTimeView.backgroundColor = RGBA(0, 0, 0 ,0.5);
[self.view addSubview:_startTimeView];
[UIView animateWithDuration:0.15 animations:^{
CGRect startFrame = _startTimeView.frame;
startFrame.origin.y = 0;
_startTimeView.frame = startFrame;
} completion:^(BOOL finished) {
}];
}
}
- (void)cancelTimeView{
[self clearDatePickView];
}
- (void)okTimeView:(NSDate *)time{
NSDateFormatter *df = [[NSDateFormatter alloc] init];
df.dateFormat = @"yyyy年MM月dd日";
if (_isClickStart) {
_startDateLabel.textColor = HexColor(@"444444");
_startDateLabel.text = [df stringFromDate:time];
}else{
_endDateLabel.textColor = HexColor(@"444444");
_endDateLabel.text = [df stringFromDate:time];
}
// 关闭选择器
[self clearDatePickView];
}
#pragma mark - 取消
- (void)clearDatePickView{
[UIView animateWithDuration:0.15 animations:^{
CGRect startFrame = _startTimeView.frame;
startFrame.origin.y = ScreenSize.height;
_startTimeView.frame = startFrame;
} completion:^(BOOL finished) {
[_startTimeView removeFromSuperview];
_startTimeView = nil;
}];
}
#pragma mark delegate
- (BOOL)growingTextViewShouldReturn:(HPGrowingTextView *)growingTextView{
[_noteTextView resignFirstResponder];
[self setTableFrame:LeftMargin];
return YES;
}
- (void)growingTextViewDidBeginEditing:(HPGrowingTextView *)growingTextView{
CGFloat offset = ScreenSize.height - TotalHeight - KeyboardHeight;
if (offset < 0) {//上移
[self setTableFrame:LeftMargin+offset];
}
}
- (void)setTableFrame:(CGFloat)tabelH{
[UIView animateWithDuration:0.25 animations:^{
CGRect tableFrame = _tableView.frame;
tableFrame.origin.y = tabelH;
_tableView.frame = tableFrame;
}];
}
- (void)keyboardHidden{
[_titleField resignFirstResponder];
[_noteTextView resignFirstResponder];
[self setTableFrame:LeftMargin];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
//
// SurveyViewController.h
// XFFurit
//
// Created by 陈俊俊 on 15/8/1.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ICRBaseViewController.h"
@interface SurveyViewController : ICRBaseViewController
@end
//
// SurveyViewController.m
// XFFurit
//
// Created by 陈俊俊 on 15/8/1.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "SurveyViewController.h"
#import "SurveyListCell.h"
#import "Survey.h"
#import "SortMaskView.h"
#import "BoltMaskView.h"
#define TopMargin 44
#define TableHeight 120
#define LeftMargin 20
#define BtnWidth 60
#define BtnHeight 24
#define BtnSize 16
typedef enum : NSUInteger {
SortTag = 3000,
BoltTag
} BtnTag;
@interface SurveyViewController ()<UITableViewDataSource,UITableViewDelegate,BoltMaskViewDelegate,SortMaskViewDelegate>
{
UITableView *_tableView;
NSMutableArray *_dataArr;
UIView *_maskView;
UIButton *currentBtn;
SortMaskView *_sortView;
BoltMaskView *_boltView;
UIBarButtonItem *_sureBtn;
UIButton *_sortBtn;
UIButton *_boltBtn;
}
@end
@implementation SurveyViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"行情调研";
self.view.backgroundColor = HexColor(@"f8f8f8");
[self initData];
[self createTableView];
}
- (void)initData{
_dataArr = [NSMutableArray array];
for (NSInteger i = 0; i < 4; i++) {
Survey *survey = [[Survey alloc]init];
survey.title = @"南汇8424西瓜调研情况";
survey.billnumber = @"150605000001";
survey.productname = @"南汇842[100213]";
survey.begindate = [IBTCommon convertToDateFrom:@"2015.05.25"];
survey.enddate = [IBTCommon convertToDateFrom:@"2015.08.06"];
[_dataArr addObject:survey];
if (i == 0) {
survey.state = @"saved";
}else if (i == 1) {
survey.state = @"submitted";
}else if (i == 2) {
survey.state = @"insurvey";
}else if (i == 3) {
survey.state = @"finished";
}
}
}
- (void)createTableView
{
_sureBtn = [[UIBarButtonItem alloc]initWithTitle:@"确定" style:UIBarButtonItemStylePlain target:self action:@selector(sureClick)];
_sortBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, 10, BtnWidth, BtnHeight) target:self sel:@selector(sortClick:) tag:SortTag image:@"black_arrow_down_with_text" title:nil titleColor:HexColor(@"888888") isCorner:NO corner:0 bgColor:nil];
_sortBtn.titleLabel.font = FontSize(BtnSize);
[self.view addSubview:_sortBtn];
_boltBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(ScreenSize.width-BtnWidth - LeftMargin,10,BtnWidth, BtnHeight) target:self sel:@selector(sortClick:) tag:BoltTag image:@"black_filter_with_text" title:nil titleColor:HexColor(@"888888") isCorner:NO corner:0 bgColor:nil];
_boltBtn.titleLabel.font = FontSize(BtnSize);
[self.view addSubview:_boltBtn];
_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];
_maskView = [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, ScreenSize.height - 64- TopMargin)];
_maskView.backgroundColor = RGBA(0, 0, 0, 0.5);
_maskView.hidden = YES;
[self.view addSubview:_maskView];
}
#pragma mark - 确定
- (void)sureClick{
if (_sortView) {
[self hiddenSortMaskView:YES];
}
if (_boltView) {
[self hiddenBoltMaskView:YES];
}
self.navigationItem.rightBarButtonItem = nil;
}
#pragma mark -按钮事件
- (void)sortClick:(UIButton *)btn{
_maskView.hidden = NO;
if (btn.tag == SortTag) {
if(_boltView){
[self hiddenBoltMaskView:NO];
}
if (currentBtn == btn) {
[btn setImage:[UIImage imageNamed:@"black_arrow_down_with_text"] forState:UIControlStateNormal];
[self hiddenSortMaskView:YES];
currentBtn = nil;
self.navigationItem.rightBarButtonItem = nil;
}else{
[btn setImage:[UIImage imageNamed:@"select_arrow_up"] forState:UIControlStateNormal];
if (_sortView == nil) {
_sortView = [[SortMaskView alloc]initWithFrame:CGRectMake(0, -105, ScreenSize.width, 105)];
_sortView.dataArr = [[NSMutableArray alloc]initWithObjects:@"默认排序",@"默认排序",@"默认排序" ,nil];
_sortView.delegate = self;
[_maskView addSubview:_sortView];
[UIView animateWithDuration:0.25 animations:^{
CGRect sortFrame = _sortView.frame;
sortFrame.origin.y = 0;
_sortView.frame = sortFrame;
}];
}
self.navigationItem.rightBarButtonItem = _sureBtn;
currentBtn = btn;
}
}else if(btn.tag == BoltTag){
if (_sortView) {
[self hiddenSortMaskView:NO];
}
if (currentBtn == btn) {
[btn setImage:[UIImage imageNamed:@"black_filter_with_text"] forState:UIControlStateNormal];
[self hiddenBoltMaskView:YES];
currentBtn = nil;
self.navigationItem.rightBarButtonItem = nil;
}else{
[btn setImage:[UIImage imageNamed:@"selected-filter_with_text"] forState:UIControlStateNormal];
if (_boltView == nil) {
_boltView = [[BoltMaskView alloc]initWithFrame:CGRectMake(0, -105, ScreenSize.width, 176)];
_boltView.backgroundColor = HexColor(@"f8f8f8");
_boltView.delegate = self;
_boltView.dataArr = [[NSMutableArray alloc]initWithObjects:@"默认排序1",@"默认排序1",@"默认排序1" ,nil];
[_maskView addSubview:_boltView];
[UIView animateWithDuration:0.25 animations:^{
CGRect sortFrame = _boltView.frame;
sortFrame.origin.y = 0;
_boltView.frame = sortFrame;
}];
currentBtn = btn;
self.navigationItem.rightBarButtonItem = _sureBtn;
}
}
}
}
- (void)hiddenSortMaskView:(BOOL)isHide{
if (isHide == NO) {
[_sortView removeFromSuperview];
_sortView = nil;
}else{
[UIView animateWithDuration:0.25 animations:^{
CGRect sortFrame = _sortView.frame;
sortFrame.origin.y = -105;
_sortView.frame = sortFrame;
}completion:^(BOOL finished) {
[_sortView removeFromSuperview];
_sortView = nil;
_maskView.hidden = YES;
}];
}
}
- (void)hiddenBoltMaskView:(BOOL)isHide{
if (isHide == NO) {
[_boltView removeFromSuperview];
_boltView = nil;
}else{
[UIView animateWithDuration:0.25 animations:^{
CGRect sortFrame = _boltView.frame;
sortFrame.origin.y = -105;
_boltView.frame = sortFrame;
}completion:^(BOOL finished) {
[_boltView removeFromSuperview];
_boltView = nil;
_maskView.hidden = YES;
}];
}
}
#pragma mark - sortDelegate
- (void)getSortValueSelectRow:(NSString *)state{
NSLog(@"%@",state);
}
- (void)getBoltValueSelectRow:(NSString *)state{
NSLog(@"%@",state);
}
#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 = @"SurveyID";
SurveyListCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
if (cell == nil) {
cell = [[SurveyListCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
if (_dataArr.count > 0) {
Survey *survey = _dataArr[indexPath.row];
[cell setSurvey:survey];
}
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return TableHeight;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
//
// Attachment.h
// XFFurit
//
// Created by 陈俊俊 on 15/8/2.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "IBTObject.h"
@interface Attachment : IBTObject
@property (nonatomic,strong)NSString *seq;//序号
@property (nonatomic,strong)NSString *content;//图片内容
@end
//
// Attachment.m
// XFFurit
//
// Created by 陈俊俊 on 15/8/2.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "Attachment.h"
@implementation Attachment
@end
//
// Survey.h
// XFFurit
//
// Created by 陈俊俊 on 15/8/1.
// Copyright (c) 2015年 Xummer. All rights reserved.
// 行情调研
#import "IBTObject.h"
@interface Survey : IBTObject
@property (nonatomic,strong)NSString *uuid;//唯一标识
@property (nonatomic,strong)NSString *billnumber;//调研单号
@property (nonatomic,strong)NSString *title;//标题
@property (nonatomic,strong)NSString *productcode;//商品代码
@property (nonatomic,strong)NSString *productname;//商品名称
@property (nonatomic,strong)NSDate *begindate;//调研开始时间
@property (nonatomic,strong)NSDate *enddate;//调研结束时间
@property (nonatomic,strong)NSString *note;//备注
@property (nonatomic,strong)NSString *state;//状态saved(未提交),submitted(已提交),insurvey(调研中),finished(已完成)
@property (nonatomic,strong)NSString *creator;//创建人姓名
@property (nonatomic,strong)NSDate *created;//创建时间
@end
//
// Survey.m
// XFFurit
//
// Created by 陈俊俊 on 15/8/1.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "Survey.h"
@implementation Survey
@end
//
// SurveyResult.h
// XFFurit
//
// Created by 陈俊俊 on 15/8/2.
// Copyright (c) 2015年 Xummer. All rights reserved.
// 行情反馈
#import "IBTObject.h"
@interface SurveyResult : IBTObject
@property (nonatomic,strong)NSString *uuid;//唯一标识
@property (nonatomic,strong)NSString *survey;//调研单id
@property (nonatomic,strong)NSString *billnumber;//调研单号
@property (nonatomic,strong)NSString *person;//用户id
@property (nonatomic,strong)NSString *personcode;//用户编码
@property (nonatomic,strong)NSString *personname;//用户名称
@property (nonatomic,strong)NSString *creator;//创建人
@property (nonatomic,strong)NSDate *created;//创建时间
@property (nonatomic,strong)NSString *price;//基础单价
@property (nonatomic,strong)NSString *unit;//基础单位
@property (nonatomic,strong)NSString *place;//产地
@property (nonatomic,strong)NSString *capacity;//市场容量
@property (nonatomic,strong)NSString *quality;//质量情况
@property (nonatomic,strong)NSArray *Attachment;//行情反馈附件
@end
//
// SurveyResult.m
// XFFurit
//
// Created by 陈俊俊 on 15/8/2.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "SurveyResult.h"
@implementation SurveyResult
@end
...@@ -171,4 +171,10 @@ ...@@ -171,4 +171,10 @@
"Content" = "内容"; "Content" = "内容";
"Download" = "下载"; "Download" = "下载";
"Attachment:" = "附件:"; "Attachment:" = "附件:";
"Announcement Detail" = "公告详情"; "Announcement Detail" = "公告详情";
\ No newline at end of file
//行情调研
"Survey" = "行情调研";
"AddSurvey" = "新建行情调研";
...@@ -170,4 +170,8 @@ ...@@ -170,4 +170,8 @@
"Content" = "内容"; "Content" = "内容";
"Download" = "下载"; "Download" = "下载";
"Attachment:" = "附件:"; "Attachment:" = "附件:";
"Announcement Detail" = "公告详情"; "Announcement Detail" = "公告详情";
\ No newline at end of file
//行情调研
"Survey" = "行情调研";
"AddSurvey" = "新建行情调研";
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