0
我試圖離開我的Inputview透明背景,但我只把它弄灰。如何刪除inputView下的灰色圖層swift
的代碼是:
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的透明背景?
由於
設置的回地面視圖 α值,如果我設置InputViewCollection?阿爾法= 0.0,那麼所有的視圖是灰色的。它不起作用。 – corocraft