iOS7中的UITextField InputView背景颜色问题

问题描述:

我正在使用UITextField的自定义键盘。所以我将自定义视图分配给TextField的inputView属性。 CustomView背景颜色在iOS7中显示为黑色,其中clearColor小于iOS7。代码和截图(iOS6的,iOS7)低于:iOS7中的UITextField InputView背景颜色问题

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]; 

iOS6 Screenshot

iOS7 Screenshot

尝试设置keyPadContainer.opaque = NO

+0

没有运气,还是同样的问题。 –

+1

看起来像这是http://*.com/questions/18984525/uitextviews-inputview-on-ios-7 – diederikh

+0

的副本但有时它会在[[backdropView layer] setOpacity:0]崩溃; 当我提出一个viewcontroller并解雇它。 –