Это не работает в ios8. Пожалуйста помоги

од:

- (void)viewDidLoad {

    [super viewDidLoad];

    CGRect rectFake = CGRectZero;

    UITextField *fakeField = [[UITextField alloc] initWithFrame:rectFake];

    [self.view addSubview:fakeField];

    UIView *av = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, 0.0, 39.0)];

    av.backgroundColor = [UIColor darkGrayColor];

    CGRect rect = CGRectMake(200.0, 4.0, 400.0, 31.0);

    UITextField *textField = [[UITextField alloc] initWithFrame:rect];

    textField.borderStyle = UITextBorderStyleRoundedRect;

    textField.font = [UIFont systemFontOfSize:24.0];

    textField.delegate = self;

    [av addSubview:textField];

    fakeField.inputAccessoryView = av;

    [fakeField becomeFirstResponder];

}

Я пытался добавить

[textField becomeFirstResponder] 

в конце, но это не работает.

Другая проблема, связанная с тем, что делегированный метод скрытия клавиатуры при нажатии клавиши ENTER, также не работает

- (BOOL) textFieldShouldReturn:(UITextField *)textField {

    [textField resignFirstResponder];

    return YES;
}

Ответы на вопрос(1)

Ваш ответ на вопрос