iOS8+iPad の組み合わせで UIAlertController がクラッシュする場合の対応

iOS8+iPad の組み合わせで UIAlertController が以下のクラッシュが発生することがあります。

* Terminating app due to uncaught exception 'NSGenericException', reason: 'Your application has presented a UIAlertController () of style UIAlertControllerStyleActionSheet. The modalPresentationStyle of a UIAlertController with this style is UIModalPresentationPopover. You must provide location information for this popover through the alert controller's popoverPresentationController. You must provide either a sourceView and sourceRect or a barButtonItem. If this information is not known when you present the alert controller, you may provide it in the UIPopoverPresentationControllerDelegate method -prepareForPopoverPresentation.' 

UIAlertController に以下の3つのプロパティを設定することによりクラッシュを回避することができます。

if let popoverController = controller.popoverPresentationController {
    popoverController.sourceView = forVC.view
    popoverController.sourceRect = CGRectMake(forVC.view.bounds.size.width / 2.0, forVC.view.bounds.size.height / 2.0, 1.0, 1.0)
    popoverController.permittedArrowDirections = UIPopoverArrowDirection.allZeros
}