Commit 0bc0698d authored by admin's avatar admin

完成问题的筛选

parent 4f401008
......@@ -23,9 +23,22 @@
self.takeImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)];
_takeImageView.image = _checkImage;
[self.view addSubview:_takeImageView];
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
backBtn.frame = CGRectMake(0, 0, 30, 44);
[backBtn setImage:[UIImage imageNamed:@"back_btn"] forState:UIControlStateNormal];
[backBtn addTarget:self action:@selector(doBack:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn];
self.navigationItem.leftBarButtonItem = backItem;
}
}
-(void)doBack:(id)sender
{
[self.navigationController popViewControllerAnimated:YES];
}
- (void) addGestureRecognizerToView:(UIView *)view {
......
......@@ -13,6 +13,8 @@
@interface MoreScreenView ()<GroupTabBarDelegate, UITextViewDelegate>
@property (nonatomic, strong) UIView *backView;
@property (nonatomic, strong) UILabel *placeholderLabel1;
@property (nonatomic, strong) UILabel *placeholderLabel2;
@end
@implementation MoreScreenView
......@@ -56,9 +58,23 @@
GroupItems *categoryItem = [[GroupItems alloc] initWithTitle:@"问题分类" view:_categoryTableView];
self.textView1 = [[UITextView alloc] init];
_textView1.delegate = self;
_textView1.tag = 9991;
self.placeholderLabel1 = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 100, 30)];
self.placeholderLabel1.text = @"请输入标题...";
self.placeholderLabel1.font = [UIFont systemFontOfSize:15.0];
self.placeholderLabel1.textColor = kOnLineCellDetailColor;
[self.textView1 addSubview:self.placeholderLabel1];
GroupItems *textViewItem1 = [[GroupItems alloc] initWithTitle:@"标题类似于" view:_textView1];
self.textView2 = [[UITextView alloc] init];
_textView2.delegate = self;
_textView2.tag = 9992;
self.placeholderLabel2 = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 100, 30)];
self.placeholderLabel2.text = @"请输入关键字...";
self.placeholderLabel2.font = [UIFont systemFontOfSize:15.0];
self.placeholderLabel2.textColor = kOnLineCellDetailColor;
[self.textView2 addSubview:self.placeholderLabel2];
GroupItems *textViewItem2 = [[GroupItems alloc] initWithTitle:@"关键字类似于" view:_textView2];
self.stateTableView = [[StateTableView alloc] init];
......@@ -169,6 +185,45 @@
return _submitBtn;
}
#pragma mark - UITextView Delegate
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text {
if (![text isEqualToString:@""]) {
if (textView.tag == 9991) {
self.placeholderLabel1.hidden = YES;
} else {
self.placeholderLabel2.hidden = YES;
}
}
if ([text isEqualToString:@""] && range.location == 0 && range.length == 1) {
if (textView.tag == 9991) {
self.placeholderLabel1.hidden = NO;
} else {
self.placeholderLabel2.hidden = NO;
}
}
if ([text isEqualToString:@"\n"]) {
[self.textView1 resignFirstResponder];
[self.textView2 resignFirstResponder];
if (textView.tag == 9991) {
if (textView.text.length != 0) {
self.placeholderLabel1.hidden = YES;
} else {
self.placeholderLabel1.hidden = NO;
}
} else {
if (textView.text.length != 0) {
self.placeholderLabel2.hidden = YES;
} else {
self.placeholderLabel2.hidden = NO;
}
}
return NO;
}
return YES;
}
@end
......@@ -35,7 +35,7 @@
{
self.delegate = self;
self.dataSource = self;
self.titleArray = [NSMutableArray arrayWithObjects:@"111",@"222", nil];
self.titleArray = [NSMutableArray arrayWithObjects:@"基础环境",@"人员", @"停车场",@"卫生间", @"物料标识", nil];
NSInteger selectedIndex = 0;
NSIndexPath *selectedIndexPath = [NSIndexPath indexPathForRow:selectedIndex inSection:0];
......
......@@ -33,7 +33,7 @@
- (void)setup
{
self.titleArray = [NSMutableArray arrayWithObjects:@"已创建",@"已完成",@"已作废",nil];
self.titleArray = [NSMutableArray arrayWithObjects:@"待解决",@"已解决",@"已作废",nil];
self.delegate = self;
self.dataSource = self;
......
......@@ -33,7 +33,7 @@
- (void)setup
{
self.titleArray = [NSMutableArray arrayWithObjects:@"全部",@"一周",@"一月",@"三月",@"一年",@"历史更多", nil];
self.titleArray = [NSMutableArray arrayWithObjects:@"全部",@"一周",@"一月",@"三月",@"一年",@"历史更多", nil];
self.delegate = self;
self.dataSource = self;
......
......@@ -415,7 +415,7 @@
{
NSInteger selectedIndex = 0;
NSIndexPath *selectedIndexPath = [NSIndexPath indexPathForRow:selectedIndex inSection:0];
[_screenView.tableView selectRowAtIndexPath:selectedIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
[_screenView.inspectTableView selectRowAtIndexPath:selectedIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
_screenView.textView.text = @"";
......
......@@ -9,6 +9,7 @@
#import <UIKit/UIKit.h>
#import "InspectListCell.h"
@interface InspectDetailView : UIView
@property (nonatomic, strong) UILabel *shopnameLabel; // 商店名称
@property (nonatomic, strong) UILabel *startDateLabel; // 起始时间
......
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