From ec078af4ce947cc8819a74fb51113f30242bf990 Mon Sep 17 00:00:00 2001 From: Bannings Date: Wed, 28 Oct 2015 20:03:27 +0800 Subject: [PATCH] temporarily suppressed the deprecated warning --- DKImagePickerController/DKPopoverViewController.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DKImagePickerController/DKPopoverViewController.swift b/DKImagePickerController/DKPopoverViewController.swift index e0c0614f..6c79174d 100644 --- a/DKImagePickerController/DKPopoverViewController.swift +++ b/DKImagePickerController/DKPopoverViewController.swift @@ -117,9 +117,10 @@ class DKPopoverViewController: UIViewController { self.view.addSubview(popoverView) } + @available(iOS, deprecated=8.0) override func didRotateFromInterfaceOrientation(fromInterfaceOrientation: UIInterfaceOrientation) { - super.didRotateFromInterfaceOrientation(fromInterfaceOrientation) - + super.didRotateFromInterfaceOrientation(fromInterfaceOrientation) + let popoverY = self.fromView.convertPoint(self.fromView.frame.origin, toView: self.view).y + self.fromView.bounds.height self.popoverViewHeight = min(self.contentViewController.preferredContentSize.height + self.popoverView.arrowHeight, self.view.bounds.height - popoverY - 40)