我不知道,如何将UIToolBar
toolBar
设置为inputAccessoryView
,请帮忙
let toolBar:UIToolbar = UIToolbar(frame: CGRectMake(0, 0, 320, 50))
toolBar.barStyle = UIBarStyle.Black
var array1:UIBarButtonItem = UIBarButtonItem(title: "Cancel", style: UIBarButtonItemStyle.Bordered, target: self, action: Selector("CancelButtonClicked"))
var array2:UIBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.FlexibleSpace, target: self, action: nil)
var array3:UIBarButtonItem = UIBarButtonItem(title: "Done", style: UIBarButtonItemStyle.Bordered, target: self, action: Selector("DoneButtonCLicked"))
var TheFullArray:NSArray = [array1,array2,array3]
toolBar.items = TheFullArray
toolBar.sizeToFit()
cell.ConvertingParamaterLabel.inputAccessoryView = toolBar // Shows Error, Cant give toolbar value as UIView
cell.ConvertingParameterLabel.inputAccessoryView(toolBar) // Not working