| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- //
- // RulesRegisterTitleViewController.m
- // kneet
- //
- // Created by Jason Lee on 3/19/15.
- // Copyright (c) 2015 ntels. All rights reserved.
- //
- #import "RulesRegisterTitleViewController.h"
- #import "CustomTextField.h"
- #import "RuleModel.h"
- #import "ValidateUtil.h"
- #import "RulesRegisterViewController.h"
- @interface RulesRegisterTitleViewController () {
- NSInteger _rowCount;
- }
- @end
- #pragma mark - Class Definition
- @implementation RulesRegisterTitleViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- // Do any additional setup after loading the view.
- [self initUI];
- [self prepareViewDidLoad];
- }
- - (void)initUI {
- self.title = @"Write the Rule's name";
- _txtRuleName.keyboardType = UIKeyboardTypeDefault;
- _txtRuleName.returnKeyType = UIReturnKeyDone;
-
- _txtRuleName.text = _predefinedRule.ruleName;
-
- }
- - (void)prepareViewDidLoad {
- _rowCount = 5;
- }
- #pragma mark - Main Logic
- #pragma mark - UITableView Delegate
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- return _rowCount;
- }
- #pragma mark - UI Events
- - (IBAction)btnNextTouched:(id)sender {
- if (![ValidateUtil validateTextfiled:_txtRuleName type:ValidateTypeNull title:@"규칙이름"]) {
- return;
- }
- _predefinedRule.ruleName = _txtRuleName.text;
- RulesRegisterViewController *vc = (RulesRegisterViewController *)[CommonUtil instantiateViewControllerWithIdentifier:@"RulesRegisterViewController" storyboardName:@"Rules"];
- vc.tmpPredRule = _predefinedRule;
- [self.navigationController pushViewController:vc animated:YES];
- }
- - (IBAction)btnCancelTouched:(id)sender {
- [self.navigationController popViewControllerAnimated:YES];
- }
- #pragma mark - MemoryWarning
- - (void)didReceiveMemoryWarning
- {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }
- @end
|