0
我正在尝试将简单的文本字段添加到Google地图视图中。文本框正在显示,但我不能写/输入任何内容。键盘也没有出现..请帮我解决这个问题。使用iOS版Google地图SDK的文本字段
这是我在做什么:
//Add text field
UITextField *textField = [[UITextField alloc] init];
textField.frame = CGRectMake(mapView_.bounds.size.width - 290, mapView_.bounds.size.height - 48, 180, 40);
textField.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin;
textField.borderStyle = UITextBorderStyleRoundedRect;
textField.font = [UIFont systemFontOfSize:15];
textField.placeholder = @"Testing...";
textField.autocorrectionType = UITextAutocorrectionTypeNo;
textField.keyboardType = UIKeyboardTypeDefault;
textField.returnKeyType = UIReturnKeyDone;
textField.clearButtonMode = UITextFieldViewModeWhileEditing;
textField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
textField.clearButtonMode = UITextFieldViewModeWhileEditing;
textField.delegate = self;
textField.userInteractionEnabled = YES;
[self.view addSubview: textField];
我发现了一个解决方法......但我还是谢谢你! –
请发布您为SO社区的利益发现的解决方法。 – keithmaxx
你有没有找到任何解决方案,请将其发布 –