我创建了 UIPickerView 的子类。在这个子类中,我添加了一个 UIToolbar 作为子视图。工具栏以我在代码中指定的方式显示,但是工具栏中的完成按钮无法识别任何触摸事件。
我究竟做错了什么?
更新:
完成按钮是这样创建的,
UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(doneButtonPressed:)];