![](/img/trans.png)
[英]iOS 7 : UITextField inputView issue when set to UIDatePicker
[英]UITextField InputView background color issue in iOS7
我正在为UITextField使用自定义键盘。 所以我将自定义视图分配给TextField inputView属性。 CustomView背景色在iOS7中显示为黑色,比iOS7的clearColor少。 代码和屏幕截图(iOs6,iOS7)如下:
keypadContainer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, appFrame.size.width, appFrame.size.height - ((self.view.frame.origin.y + self.view.bounds.size.height) - kp.bounds.size.height))];
keypadContainer.backgroundColor=[UIColor clearColor];
[keypadContainer addSubview:buttonsView]; //Here buttonsView is the view which conatins buttons for 0 to 9 digits.
numberField.inputView = keypadContainer;
numberField.inputView.backgroundColor=[UIColor clearColor];
尝试设置keyPadContainer.opaque = NO
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.