Skip to content

Instantly share code, notes, and snippets.

@wakusei-meron-
wakusei-meron- / textfield.m
Last active August 29, 2015 14:03
UITextFieldで変換を完了せずに、テキストフィールド内の文字を取得
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{
// NSLog(@"change");
NSMutableString *tmpStr = [NSMutableString stringWithString:textField.text];
[self.view addSubview:self.resultTableView];
if ([string isEqualToString:@""]){//delete押された時
if ([textField.text length] == 1) {
[self.resultTableView removeFromSuperview];