在iOS8中显示UIPickerView与无法正常工作UIActionSheet
该代码适用于iOS7,但它在iOS8中不起作用.我确定这是因为在iOS8中不推荐使用UIActionSheet 而Apple建议使用UIAlertController.
但是,如何在iOS8中做到这一点?我应该用UIAlertController?
iOS7:

iOS8:

编辑:
uipickerview uiactionsheet ios uialertcontroller actionsheetpicker
我有一个标题字符串为"DO:这些任务"的UIActionSheet.在标题字符串中,子字符串"DO:"应该是粗体(具有特定的字体大小),子字符串"这些任务"应该是常规的.可能吗?我怎样才能做到这一点?
我的故事板视图中有一个UIDatePicker连接到头文件中的IBOutlet.
在实现文件中,我将一些属性设置为选择器,然后将其分配给我的textFields:
[self.txtEndDate setInputView:self.picker];
Run Code Online (Sandbox Code Playgroud)
这在iOS 7中运行良好,但是对于iOS 8,它给出了以下错误:
Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:<UICompatibilityInputViewController: 0x7c2d8800> should have parent view controller:<InserimentoDurata: 0x7aec2b10> but requested parent is:<UIInputWindowController: 0x7b92b400>'
Run Code Online (Sandbox Code Playgroud)
有关如何解决此问题的任何想法?