UITextField auto键入日语时向上滚动

时间:2014-10-02 02:51:22

标签: ios objective-c uitextfield uinavigationbar uitextfielddelegate

我创建文本字段支持日语,英语
当我打字英语时,确定 但是当我打字日语时  视图向上移动并隐藏当前textfeild behide导航栏

在输入>>>之前http://i.stack.imgur.com/PyiXB.png

输入>>>后输入

http://i.stack.imgur.com/JEoxA.png

这里是我的代码

titleLabel = [[UITextField alloc]
                  initWithFrame:CGRectMake((self.view.frame.size.width/2)-(self.view.frame.size.width/1.1)/2,
                                           self.view.frame.size.height/6,
                                           self.view.frame.size.width/1.1,
                                           self.view.frame.size.height/10)];
 titleLabel.autocorrectionType = UITextAutocorrectionTypeNo;
    titleLabel.keyboardType = UIKeyboardTypeDefault;
    titleLabel.returnKeyType = UIReturnKeyDone;
    titleLabel.clearButtonMode = UITextFieldViewModeWhileEditing;
    titleLabel.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
    titleLabel.delegate = self;

1 个答案:

答案 0 :(得分:0)

尝试在viewDidLoad

上添加此行
self.navigationController.navigationBar.translucent = NO;