I have a text box that has a helper view of UIInputView .
When I touch my text box, and the keyboard flew into view, and I can see a subspecies of viewing accessories, but it does not have a visible background. When the keyboard animation is complete, the UIInputView background appears.
What can I do to make the background of the UIInputView be visible while the keyboard animation is still ongoing?
Here is my code:
UIInputView *inputView = [[UIInputView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, CGRectGetWidth(self.bounds), 44.0f) inputViewStyle:UIInputViewStyleKeyboard]; UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem]; button.frame = CGRectInset(inputView.bounds, 15.0f, 2.0f); [button setTitle:@"Button" forState:UIControlStateNormal]; [inputView addSubview:button]; UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(0.0f, 0.0f, CGRectGetWidth(self.bounds), 44.0f)]; textField.inputAccessoryView = inputView; [self addSubview:textField];
objective-c uitextfield ios7 inputaccessoryview
Pim
source share