Ei kuvausta

ASIdeaViewController.m 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // ASIdeaViewController.m
  3. // ACSION
  4. //
  5. // Created by 小花 on 2019/4/23.
  6. // Copyright © 2019 acsion. All rights reserved.
  7. //
  8. #import "ASIdeaViewController.h"
  9. @interface ASIdeaViewController ()
  10. @property (nonatomic, strong) UITextField *textField;
  11. @property (nonatomic, strong) UIButton *commitBtn;
  12. @end
  13. @implementation ASIdeaViewController
  14. - (void)viewDidLoad {
  15. [super viewDidLoad];
  16. self.view.backgroundColor = [UIColor backgroundColor];
  17. [self configSubViews];
  18. self.title = @"意见反馈";
  19. }
  20. - (void)configSubViews {
  21. self.textField = [[UITextField alloc] initWithFrame:CGRectMake(10, 10, SCREEN_WIDTH-20, 200)];
  22. self.textField.textColor = [UIColor colorWithHexString:@"3E3E3E"];
  23. self.textField.backgroundColor = [UIColor whiteColor];
  24. self.textField.layer.cornerRadius = 6;
  25. self.textField.placeholder = @"请输入反馈信息...";
  26. self.textField.contentVerticalAlignment = UIControlContentVerticalAlignmentTop;
  27. [self.view addSubview:self.textField];
  28. self.commitBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT-kNavBarHeight-40-kSafeBottomHeight, SCREEN_WIDTH, 40)];
  29. self.commitBtn.backgroundColor = [UIColor whiteColor];
  30. [self.commitBtn setTitle:@"提交" forState:UIControlStateNormal];
  31. [self.commitBtn addTarget:self action:@selector(commitAction) forControlEvents:UIControlEventTouchUpInside];
  32. self.commitBtn.titleLabel.font = [UIFont systemFontOfSize:15];
  33. [self.commitBtn setTitleColor:[UIColor baseColor] forState:UIControlStateNormal];
  34. [self.view addSubview:self.commitBtn];
  35. }
  36. - (void)commitAction {
  37. [XHToast showCenterWithText:@"提交成功"];
  38. [self.navigationController popViewControllerAnimated:YES];
  39. }
  40. @end