123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- //
- // ComDealVC.m
- // LNManager
- //
- // Created by EchoShacolee on 2017/6/6.
- // Copyright © 2017年 lee. All rights reserved.
- //
- #import "ComDealVC.h"
- @interface ComDealVC ()<UITextViewDelegate,UIScrollViewDelegate>
- {
-
- UITextView * _tx;
- }
- @end
- @implementation ComDealVC
- - (void)viewDidLoad {
- [super viewDidLoad];
-
- //
- UIButton * btn = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 60, 25)];
- btn.backgroundColor = RQMianColor;
- [btn setTitle:@"发送" textColor:[UIColor whiteColor] font:15 fotState:0];
- [btn addTarget:self action:@selector(rightBtnClick) forControlEvents:UIControlEventTouchUpInside];
-
- self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:btn];
-
- //
- UIScrollView * scrV = [[UIScrollView alloc]initWithFrame:kFrame];
- scrV.contentSize = CGSizeMake(0, kSize.height);
- scrV.showsVerticalScrollIndicator = NO;
- scrV.delegate = self;
- [self.view addSubview:scrV];
-
- UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapHandle)];
- [scrV addGestureRecognizer:tap];
-
- UILabel *lab = [[UILabel alloc]initWithFrame:CGRectMake(10, 20, kSize.width, 30)];
- lab.text = @"请输入意见:";
- lab.font = [UIFont systemFontOfSize:17];
- [scrV addSubview:lab];
-
- _tx = [[UITextView alloc]initWithFrame:CGRectMake(20, 60, kSize.width-40, 180)];
- _tx.delegate = self;
- _tx.font = [UIFont systemFontOfSize:15];
- [scrV addSubview:_tx];
- }
- -(void)rightBtnClick{
-
- [self.view endEditing:YES];
-
- if (_tx.text.length == 0) {
- [self showMsgByAlertVCWithString:@"请输入意见"];
- return;
- }
-
- NSMutableDictionary * mdic = [NSMutableDictionary new];
- [mdic setValue:_theId forKey:@"objectId"];
- [mdic setValue:_tx.text forKey:@"content"];
- [mdic setValue:defUser.userDict[@"id"] forKey:@"userId"];
-
- [self getDataWithDic:mdic method:@"dealCompl" block:^(NSDictionary *successdic) {
-
- ShowMsg(@"发送成功");
- [self.navigationController popViewControllerAnimated:YES];
- if (self.block) {
- self.block();
- }
- }];
- }
- -(void)tapHandle{
-
- [self.view endEditing:YES];
- }
- -(void)scrollViewDidScroll:(UIScrollView *)scrollView{
-
- [self.view endEditing:YES];
- }
- - (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
|