TextField附件查看无法正常工作

时间:2014-06-06 13:08:25

标签: ios swift accessoryview

我不知道,如何将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

0 个答案:

没有答案