2017-04-17 5 views
0

私は自分のInputviewの背景を透明なままにしようとしていますが、灰色にしかなりません。inputView swiftで灰色のレイヤーを取り除く方法

enter image description here

コードは次のとおりです。

let fakeField : UITextField = UITextField(frame: CGRect.zero) 
    //1 
    InputViewCollection = InputView(frame: CGRect(x: 0, y: 0, width: 0, height: 216)) //Intialize custom input view 
    InputViewCollection?.delegate = self //delegate 
    InputViewCollection?.dataSource = self //datasource 

    //2 
    InputViewCollection?.backgroundColor = UIColor.clear 
    self.fakeField.inputView = InputViewCollection //Assign input view 
    self.fakeField.keyboardAppearance = .default 
    self.view.addSubview(self.fakeField) 

私はinputviewの透明な背景を残すことができますどのように?

おかげ

答えて

0

は私がInputViewCollectionを設定している場合InputViewCollection?.alpha = 0.0

+0

のようなバックグランドビュー のアルファ値を設定しよう?、α= 0.0、そして、すべてのビューは灰色です。それは動作しません。 – corocraft

関連する問題