<commit_before>//
//  AddChecklist10ItemViewController.swift
//  Checklists10
//
//  Created by <NAME> on 20.11.16.
//  Copyright © 2016 Closure One. All rights reserved.
//

import Foundation
import UIKit

protocol AddChecklist10ItemViewControllerDelegate: class {
  func addChecklist10ItemViewControllerDidCancel(_ controller: AddChecklist10ItemViewController)
  func addChecklist10ItemViewController(_ controller: AddChecklist10ItemViewController, didFinishingAdding checklist10Item: Checklist10Item)
}

class AddChecklist10ItemViewController: UITableViewController, UITextFieldDelegate {
  
  // MARK: IBOutlet/IBAction
  
  @IBOutlet weak var addChecklist10ItemTextField: UITextField!
  @IBOutlet weak var doneBarButton: UIBarButtonItem!

  weak var delegate: AddChecklist10ItemViewControllerDelegate?
  
  override func viewWillAppear(_ animated: Bool) {
    print("AddChecklist10ItemViewController.viewWillAppear")
    super.viewWillAppear(animated)
    
    let when = DispatchTime.now() + 3
    DispatchQueue.main.asyncAfter(deadline: when) {
      self.addChecklist10ItemTextField.becomeFirstResponder()
    }
    
    addChecklist10ItemTextField.becomeFirstResponder()

  }<commit_msg>Still trying to fix the becomeFirstResponder-not-working-problem<commit_after>//
//  AddChecklist10ItemViewController.swift
//  Checklists10
//
//  Created by <NAME> on 20.11.16.
//  Copyright © 2016 Closure One. All rights reserved.
//

import Foundation
import UIKit

protocol AddChecklist10ItemViewControllerDelegate: class {
  func addChecklist10ItemViewControllerDidCancel(_ controller: AddChecklist10ItemViewController)
  func addChecklist10ItemViewController(_ controller: AddChecklist10ItemViewController, didFinishingAdding checklist10Item: Checklist10Item)
}

class AddChecklist10ItemViewController: UITableViewController, UITextFieldDelegate {
  
  // MARK: IBOutlet/IBAction
  
  @IBOutlet weak var addChecklist10ItemTextField: UITextField!
  @IBOutlet weak var doneBarButton: UIBarButtonItem!

  weak var delegate: AddChecklist10ItemViewControllerDelegate?
  
  override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)
    /*
    let when = DispatchTime.now() + 3
    DispatchQueue.main.asyncAfter(deadline: when) {
      self.addChecklist10ItemTextField.becomeFirstResponder()
    }
     */
    
    addChecklist10ItemTextField.becomeFirstResponder()
    print("ddChecklist10ItemTextField.becomeFirstResponder() passed")

  }
{'fraction_non_alphanumeric': 0.0718927701056052, 'fraction_numerical': 0.03330625507717303, 'mean_word_length': 5.21969696969697, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '987188', 'n_tokens_mistral': 791, 'n_tokens_neox': 690, 'n_words': 144}