我正在尝试使用AKPickerView library
创建水平选择器视图。
我将AKPickerView库作为Pod文件导入,创建了桥接头并正确完成了所有设置。但是,我得到The operation couldn’t be completed - OSStatus error -600
当我尝试运行项目时。你能告诉我我做错了吗。谢谢你的帮助。
import UIKit
import AKPickerView
class ViewController: UIViewController, AKPickerViewDelegate, AKPickerViewDataSource {
var myArray = ["one","two","three"]
@IBOutlet var pickerView: AKPickerView!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
self.pickerView = AKPickerView(frame: CGRect.zero)
self.pickerView.delegate = self
self.pickerView.dataSource = self
}
func numberOfItemsInPickerView(pickerView: AKPickerView!) -> UInt {
return UInt(self.myArray.count)
}
func pickerView(pickerView: AKPickerView!, titleForItem item: Int) -> String!{
return self.myArray[item]
}
func pickerView(pickerView: AKPickerView, didSelectItem item: Int) {
// no set up yet
}
}
最佳答案
只需退出iOS模拟器,然后重新打开模拟器,然后构建您的源代码即可。
关于swift - AKPickerView-(OSStatus错误-600。),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/38160975/