【发布时间】:2015-05-13 15:51:59
【问题描述】:
以下是我将 inputAccessoryView(上面带有完成按钮)添加到我的 textView 的代码:
let keyboardButtonView = UIToolbar()
keyboardButtonView.sizeToFit()
let doneButton = UIBarButtonItem(image: nil, style: .Done, target: self, action: "closeMessageViewKeyboard")
doneButton.possibleTitles = ["Done"]
var toolbarButtons = NSMutableArray()
toolbarButtons.addObject(doneButton)
keyboardButtonView.items = toolbarButtons as [AnyObject]
messageView.inputAccessoryView = keyboardButtonView
完成按钮永远不会出现。我得到的只是一个白色的配件条。我这里有什么遗漏吗?
【问题讨论】:
标签: ios xcode swift uibarbuttonitem inputaccessoryview