【发布时间】:2014-01-06 10:49:42
【问题描述】:
我正在为 UITextField 使用自定义键盘。所以我将自定义视图分配给 TextField inputView 属性。 CustomView背景色在iOS7中显示为blackcolor,比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];
【问题讨论】: